Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Update in Display Business Rule

dharani2607
Tera Contributor

Hello,

I have a requirement to create a report "item not yet started" (request not viewed by assigned to person). I have created a custom field and not included in form and I need to update the field to true to use it in the BR

I have created a display query BR

 

 var logged_user = gs.getUserID();
       if (logged_user == current.assigned_to) {
             g_scratchpad.assigned_to = true;
    }

How to update current.is_request_viewed = true in BR?    or    in onload client script I can use scratchpad variable to set the field but since that field is not available in form g_form.setValue is not working.

Appreciate your help

Thanks

7 REPLIES 7

No it didn't update 😞

Hi Dharani,

Did you tried with before business rule?

Regards,
Deepankar Mathur

Shree3
Tera Expert

Hi Dharani,

 

If you want to update the field, try with a before BR,

 var logged_user = gs.getUserID();
       if (logged_user == current.assigned_to) {
             current.is_request_viewed = true;
    }