Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

UI policy script not working.

abhisek
Tera Contributor

I have written a UI Policy script on a date field but that is not working.

 

g_form.setDisplay('field_date', 'true');
 
Can anyone please help me out.
1 ACCEPTED SOLUTION

kkrushkov
Mega Sage

Hello, @abhisek  

Check the order; if a UI Policy applies the same actions to the same field and has the same or higher order, it won't take effect.
Also, if you need such a simple functionality, why not use UI policy actions instead?

kkrushkov_0-1711723297211.png

 

View solution in original post

5 REPLIES 5

sujitha16
Kilo Patron

@abhisek  

Is that checkbox “Hidden” set as true on the variable?

 

Please mark this as helpful and accept the solution if it had helped in your case.

Thanks,

Sujatha V M

 

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

Hi @sujitha16 

Yes but still not working.

kkrushkov
Mega Sage

Hello, @abhisek  

Check the order; if a UI Policy applies the same actions to the same field and has the same or higher order, it won't take effect.
Also, if you need such a simple functionality, why not use UI policy actions instead?

kkrushkov_0-1711723297211.png

 

Hi @kkrushkov 

Tried this also but not working.