cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic visibility of the field

Former Member
0 Kudos

Hi pundits,

I have an ISR Form , which contains two initial fields. Basing on the Input, i am updating the value of a field , which is in SPECIAL_DATA. This field is available in the context of the Interface.

Now basing on the value of that field of SPECIAL_DATA , I want to display other fields of the FORM.

Initially, I don't want to display some fields. But after validation, I want to display the fields on the FORM.. How to proceed on it?

I tried to retrieve the field value which is boolean , in FORMCALC script like the following.

if($record.FLAG.DATA.FIELD == true)

then

this.presence = 'visible'

else

this.presence = 'invisible'.

endif.

This is not working............Please guide me , how to proceed further.

Thanks,

usha

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The "this" qualifier if I am right only belongs to javascript and is not valid formcalc. Use $ instead of "this". You can check by seeing if you get the intellisense dropdown showing you the methods if you type $. or this.

In which event are you writing this script? Where are you performing the validations?

Let's say you have two fields A and B and a button script. In the click event of button, you could write something like (in javascript)

if (A.rawValue == "Hello World")

B.presence = "hidden";

else

B.presence = "visible";

The difference between hidden and invisible of course is that in flow layouts B does not take up any rendering space (the other controls move up to cover the blank space) while invisible controls still take up layout space on the page.