How to call the data resource from Client Scripts UI Builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2023 10:41 AM - edited 12-10-2023 10:59 AM
I have define the state parameter "atternityLink" its type is string and have given initial value to that link.
const userId = api.data.caller_info.result.user_name.value;
Thanks
Mohammed Ghouse

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2023 10:51 PM
Hi,
In order to execute your client script you to trigger it through an event.
Can you please explain the use case?
When your state value should change? is there any activity happening on your page that can be used to trigger event though respective component.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2023 11:27 PM
Hello @Anil Lande ,
I am trying to create external URL based on user_name and CI details, So I used the component called Text Link, I tried below multiple ways to achieve but not working.
1) In Link (Edit scripted property value and return the URL) I try to create the URL dynamically (URLSTRING1" + api.data.device_info.results.name.value + "URLSTRING2" + api.data.caller_info.result.user_name.value +"URLSTRING3") trying to get the data from local data resource.
2) After the above method didn't work (I tried using Event handler), Triggering Client Script which set the client State. After that triggering Link to Destination Event Handler in external url field binding the state value.
I am new to UI Builder and not sure I am doing in right way.
Thanks
Mohammed Ghouse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 01:46 AM
Hi @mohammedghouse ,
Can you please elaborate how did you get the client script triggered, i.e. where and when did you set the value to that state. Setting the value to state in UI Builder is an "asynchronous" process, it's similar to React / Vue state management.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 02:17 AM
Hi,
First try sending hardcoded values through Client state variable.
If you are able to get the static link then try to make it dynamic based on 1 value and similar way you can go for additional inputs.
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 02:27 AM
Agree with Anil here. I would also generate log to see whether url path is correct.