Hide button in UI Builder page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 11:46 AM
Hi Community, I need your help on this. I have a requirement about hiding a button (Cancel) based on field (Status). When this field is "Submitted" value this button will appear in form otherwise will remain hidden. I don´t know how to achieve this as I already read a lot of docs and similar threads but it´s just not the same case and UI Builder is not that straightforward as intended. Can someone help with this, hopefully is something simple but I think it requires specialized knowledge.
For example what code (client script) is needed to make false the Client State parameter based on a value
field (status) for that in UIB page. Screenshot below:
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 01:15 PM
Do you have a data resource setup? glide_form_1? can't tell given line 10 is commented out. It should look similar to below where @context.props related to page parameters. If you don't have those, then you can enter the correct property or the actual table name and sysID.
if you don't have a data resource, you need one to start.
Once all of this is working, then you can go back to your original script and finish it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 03:12 PM
Thanks for trying to help with this Michael. To answer your question, yes there is a data resource setup. But how can build something from the client script ('Data Fetch Succeeded' event handler, screenshot), honestly I don´t understand the code. The screenshot I first shared it was just an example. Or there is other process to hide the button, what steps should I take.
Thanks in advance