How to make ui action visible if certain field is not empty?

jenny32
Tera Guru

Hi All,

In incident table I have a field "xyz" which is a reference to "Application" table and in "Application" table I have field "abc" which is of string type.

According to my requirement I have written ui action and now the challenge I'm facing here is I need to hide the button when "abc" field is empty.

I tried putting current.xyz.abc != "" in my ui action condition field. So, for the first time when I open incident form the button is hidden. How can I make it visible when I select "xyz" field.

In ui action "Client callable" is true based on my requirement.

I'm not getting where I'm going wrong. Can anyone suggest me!!!!

Thanks,

Jennifer.

21 REPLIES 21

Hi Michael,



                  your snippet helped and working fine when ever the form is reloaded but I want the same to work when the field is changed.




Thanks,


Jennifer


Kalaiarasan Pus
Giga Sage

I guess the question is about Showing/Hiding the button on change of a field?


Hi Kalaiarasan,



Yes. It's about hiding button. When ever the field "xyz" in incident form which is a reference to "Application" table is empty and "abc" field in application field is empty the button should be invisible and when you change the "xyz" field it should be visible. How to achieve the "UI action" functionality for hiding the button onChange of a field.



Thanks,


Jennifer.


Hi Jenifer,


The screenshot contains an example.Whenever VIP field is true for a incident caller then an UI action Test is visible in the Incident form.


Your requirement is like this.Please modify accordingly.



1.Write a advanced condition in the UI action.Example


find_real_file.png



2.Write a script include with name and function same as that of the function name written in the UI action.Modify your script accordingly.



find_real_file.png





Please mark it as Helpful/Correct according to its impact.




Thanks,


Mihir


Hi Mihir,



Thanks. Can you tell me how can we fetch the result of script include in UI action and disable the button.




Thanks


Jennifer