I have a bit of a weird challenge, I'm trying to set the value of a text field conditionally based on the value of document property.
My app has a 'Location Details' page, where I show the location's name, description, etc. I would also like to be able to show the 'Location Type' in a text field on that page. The problem is that the 'Location Type' strings don't match how I need them to look on the screen.
Here's my list of location types. On the left you'll see the location type, and on the right you'll see how I need it to appear in the user interface:
- ACCESS_POINTS: "Access Point"
- POI: "Point of Interest"
- TRAIL_HEAD: "Trail Head"
- RAPID: "Rapid"
- HAZARD: "Hazard"
- BRIDGE: "Bridge"
The location types need to be in this format because we're using them within custom code, so I can't just change the string of the location type to solve this problem. I need to be able to convert the location type into a corresponding string that is appropriate to include in the UI.
How to set text dynamically based on a value
Actions & Logic
Resolved
No
1
2 replies