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

Neeraj31
Mega Sage

Hi Dharani,

Place the field on your form and hide it with UI policy and set it in client script.

Please mark reply as Helpful/Correct, if applicable. Thanks!

Thanks and Regards,

Neeraj Sharma

No I shouldn't edit the form layout and add the field in form

Hi Dharani,

If you add the field and make it invisible using UI policy then your form layout will be same.

Please mark reply as Correct/Helpful , if applicable. Thanks!

Thanks and Regards,

Neeraj Sharma

dmathur09
Kilo Sage
Kilo Sage

Hi Dharani,

You can update the display business rule as below

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

Regards,

Deepankar Mathur