Hiding a variable on the request form but adding it to the catalog task

Laura12
Tera Contributor

We have a form that will create a catalog task after a first approval.  I'm using flow designer and in that catalog task, I want to add a catalog variable so that a member of that assignment group has to enter a value in that variable before closing the task.

 

I've added the variable to the catalog item; however, I also don't want it to show up when the user completes the form because the field is unrelated to the items on the form.  I only want to be able to add it to the catalog task.  Is there a way to do this?  I've tried a UI policy/action on the form where visible = false and the form is fine but when I added it to the catalog task, it was not visible.

1 ACCEPTED SOLUTION

Hello @Laura12 ,

Instead of applying on catalog task , apply it on catalog item view and requested item . And make field visible false. Its working on my PDI.

RohiniSSane_0-1709138031825.png

 

Please Mark Helpful.

 

Regards,

Rohini Sane

View solution in original post

10 REPLIES 10

Shankar Manohar
Mega Guru

Hi,

 

Create a catalog UI policy on the respective catalog item and check the applies to catalog task only to show it on the catalog task alone. Also, use the catalog UI action accordingly or script it if required to show the field.

 

Catalog UI policy script :

var shortDescription = 'short description of your catalog task';
    if(g_form.getValue('short_description') == shortDescription){        
        g_form.setDisplay('variable_name', true);
}
        
      
       

 

 

 

ShankarManohar_0-1709070259957.png

 

Thanks

Shankar M

Mark the Answer correct if it helps. 

I tried to enter your script into my UI Policy but there seems to be an issue.  I think it might have to do with me making the variable mandatory?  I've added screenshots of the error message and the ui policy and ui action.

 

Hi Laura,

 

 The solution is you either you use UI policy action to show the variable( EA support variables) or the script I provided to show only on the catalog task. 

 

 Remove the script from the UI policy and make the variable ES Support Variable visible in UI policy action to Visible True. This will allow the ES Support levels will be only shown on the catalog task but not on the order form.

 

Note : Script needs to be used only if you want to show variable on specific task(s). I corrected the syntax errors in previous posts and also in the variable_name, you should use your variable name. 

 

Thanks

Shankar M

 

Hi Shankar,

 

Thanks so much for your replies; however, the variable is still showing up on the form even though I have the checkbox checked for applies on catalog tasks and it's missing from the catalog task.  I've provided two more screenshots.