cancel
Showing results for 
Search instead for 
Did you mean: 

Formcalc - changing value of the text field

former_member217677
Participant
0 Kudos


Hello,

please help me to solve this easy question.

I have 4 different fields with binding to the same element from interface, e.g. bindElement.

I need to hide these fields in case bindElement = Null and change values in case bindElement <> Null.

I'm using Formcalc:

For field 1:

if(HasValue($) == 0)

then $.presence = "hidden"

else

$.rawValue = "Field1"

endif

For field 2 (it should display value of bindElement😞

if(HasValue($) == 0)

then $.presence = "hidden"

endif

For field 3:

if(HasValue($) == 0)

then $.presence = "hidden"

else

$.rawValue = "Field3"

endif

Now if I' changing Field 1, all fields getting value "Field1". And its wrong. Can I use rawValue or do I need another command?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Florian
Active Contributor
0 Kudos

If you use Formcalc you do not have to use rawValue, you just can put the input into the variable.

An example:

if( HasValue($) eq 0) then

$ = "hidden"

else

$ = "Field3"

endif

Regards

Florian

Answers (1)

Answers (1)

navip
Active Participant
0 Kudos

Hi,

You can directly write FormCalc as shown below:

if(HasValue($) == null)

then $.presence = "hidden"

else

$.rawValue = "Field1"

endif

---

Naveen

Florian
Active Contributor
0 Kudos

Hi Naveen,

you are right, but you don't need to put the rawValue. Sure, if you want to hide the field, you need the presence behind.

It's as mentioned before:

if(HasValue($) == null)

then $.presence = "hidden"

else

$ = "Field1"

endif

Regards

Florian