Show a variable on Task but not on the RITM

Bhavana3
Tera Contributor

Hey,

I have a requirement to show a variable with choice yes / No that should be available  / visible only on the Task 1 but not on RITM or while User is filling the request Initaiily.

 

Can someone please help me with more details on how this can be achieved.

 

4 REPLIES 4

Amit Gujarathi
Giga Sage
Giga Sage

Hi @Bhavana3 ,
I trust you are doing great.
Please refer below code for the same.

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue === '') {
        return;
    }

    var taskType = g_form.getValue('task_type'); // Replace 'task_type' with the field that identifies the task type
    var isTask1 = (taskType === 'task1'); // Replace 'task1' with the identifier for Task 1

    // Show the variable only for Task 1
    g_form.setVisible('your_variable_name', isTask1); // Replace 'your_variable_name' with the name of your variable
}

 

 


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



Jaspal Singh
Mega Patron
Mega Patron

Hi Bhavana,

There happens to be Applies to Request, Applies to Catalog Task, etc. as checkbox parameters on UI Policies. Did you check that? As you can check/uncheck the relevant checkbox to get things worked for your use case.

Hey,
Thanks for the reply.
I tried with the UI Policy , but that isnt working 😞

Musab Rasheed
Tera Sage
Tera Sage

Hello,

You can easily do with Catalog UI policy, make sure 'When to apply' only one checkbox is checked like in below screenshot.

MusabRasheed_0-1700806224661.png

Please hit like and mark my response as correct if that helps
Regards,
Musab