Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

Ui builder data binding is not working for dynamic filter

shiva prasad1
Tera Contributor

I have list component  which is on incident table.

 

I have scenario of when we open the case record on the workspace, i want to show that customer/account related active incidents in the section ( we have create separate page varient for this )

shivaprasad1_0-1785258361257.png

 

Here i want  to bind the data ( example : Active=true^company=case.account)

So when i tried to bind the data it's giving me only active incident and company value is coming empty even tried to get sysID as well

the below image is binding the data for company field.

shivaprasad1_0-1785257313113.png

Here i am trying to get the company name. So that whatever the case record open and whatever the company/account it is associated with it, i want to show active incidents of that customer.

 

Even tried by creating lookup record as data resource and configured to get account name from the case record and tried by using scriptd filter
here is the script filter:

/**
 * @Param {params} params
 * @Param {api} params.api
 * @Param {any} params.imports
 */
function evaluateProperty({api}) {
    var arr = [];
    var results = api.data.look_up_records_1?.results || [];

    for (var i = 0; i < results.length; i++) {
        var myObj = {};
        // Accessing the 'account' object properties from each result record
        myObj.id = results[i].account?.value || '';
        myObj.label = results[i].account?.displayValue || '';

        arr.push(myObj);
    }

    return arr;
}

 

Any guidance or examples would be appreciated.

 

0 REPLIES 0