UI Builder Client Script to Data Broker Script

Teo Gamarra
Tera Expert

Hello all! Is there any method to call a DataBrokerScript. Running this script from UIBuilder Client Script after capturing desired data.

function handler({api, event, helpers, imports}) {   
    var itemSelected = event.payload.value;
    // Trying to call the Data Broker script and pass the itemSelected as a parameter over here:
    api.someMethodToCallDataBrokerScript('DataBrokerScriptName', { itemSelected: itemSelected });
}

Or should create a GlideAjax instance, targeting the server-side script.
1 ACCEPTED SOLUTION

Hasan6
ServiceNow Employee
ServiceNow Employee

Hi Eberteo,

With the current screenshots, I am struggling to debug the issue.

Sure, let's get on a call to discuss this.

Do reach out to me at hasan.bilgrami@servicenow.com, and lets set something up.

Best

Hasan

View solution in original post

6 REPLIES 6

Teo Gamarra
Tera Expert

Hasan good news! After adding the properties, I was able to get the 'dataSelected' value, look at the console debugger picture as reference.

eberteo012_2-1701117500185.png

 

However, a new issue has arrived in the UI Builder for the 'Dropdown 2' component. Even though the 'transformedProfiles' is returning an object for the 'Dropdown 2' as you can see in the debugging picture. When calling it at the 'List items' field, this one is not being properly returned. I'd appreciate it if a zoom call is possible to work on this issue.



eberteo012_3-1701117839995.png

 

Hasan6
ServiceNow Employee
ServiceNow Employee

Hi Eberteo,

With the current screenshots, I am struggling to debug the issue.

Sure, let's get on a call to discuss this.

Do reach out to me at hasan.bilgrami@servicenow.com, and lets set something up.

Best

Hasan