The CreatorCon Call for Content is officially open! Get started here.

How to clear the field using the UI Action?

Nakata1
Tera Contributor

HI All 

I have set the UI action script as below, but it doesn't work. What is the cause?

current.u_reference_field=='';
action.setRedirectURL(current);
current.update();

 

1 ACCEPTED SOLUTION

== is used to check if something matches. Single = is used to set a value.

View solution in original post

9 REPLIES 9

rojerio
Tera Contributor

Hi,

 

Update like below,

current.u_reference_field = '' ;
action.setRedirectURL(current);
current.update();

== is an equality operator checks whether its two operands are equal, or not in if condition or any other.

Thanks,

Rojerio.

Dhananjay Pawar
Kilo Sage

Hi Nakata,

The answer you have marked correct is already provided by Willem, So you should mark his response as correct.

Thanks,

Dhananjay.

Thank you Dhananjay, really appreciate you pointing this out 🙂

WC Willem.

Have a great day.

Willem
Giga Sage
Giga Sage

@Nakata can you kindly mark my answer as Correct and helpful. As said, I replied and after that some users replied duplicates.

We do not want to reward users posting duplicate answers.

Please update the Correct and helpful answer to my answer to prevent users posting duplicate answers.