2023-01-13 09:47 AM - last edited on 2023-05-26 11:44 AM by Daniel Kassai
Hello,
We have a hideparameter function, but is there a showparameter somewhere hidden in the deeps of gdl code?
I want to show a parameter only when couple of conditions are met among the many I have.
IF door_opening <> 1 AND multi_door <> 1 THEN
HIDEPARAMETER "second_door_opening"
ENDIF
The idea behind it is, if the door_opening and multi_door are both different than 1, then hide the parameter. For some reason is not working for me.
For example, if door_opening = 2 and multi_door = 1, the parameter is showing still, which is not what I want. Only if door_opening = 1 and multi_door = 1 the parameter should show, otherwise keep it hidden.
Hope all this makes sense.
Juan.
Solved! Go to Solution.
2023-01-16 12:02 AM - edited 2023-01-16 12:16 AM
Hi,
what you said in the first half of you description was
"if the door_opening and multi_door are both different than 1, then hide the parameter"
IF door_opening # 1 AND multi_door # 1 THEN HIDEPARAMETER "second_door_opening" ENDIF
***Not the outcome you describe in the second part of your description
what you said in the second half of your your description was
"Only if door_opening = 1 and multi_door = 1 the parameter should show, otherwise keep it hidden"
IF door_opening = 1 AND multi_door = 1 THEN
!!!Show the parameter
ELSE
HIDEPARAMETER "second_door_opening"
ENDIF
there is no "SHOWPARAMETER" command.
another way to write that in English would be:
"if the door_opening is different than 1 or multi_door is different than 1, then hide the parameter,
so only if door_opening = 1 and multi_door = 1 the parameter should show, otherwise keep it hidden."
IF door_opening # 1 OR multi_door # 1 THEN HIDEPARAMETER "second_door_opening" ENDIF
The AND/OR for exclusion combinations are sometimes confusing.
the # "not equal to" is on the Shift+3 key on the keyboard.
I hope this helps.
2023-01-13 10:12 AM
It seems like using OR instead of AND it does the trick, but not sure if it is the right way.
IF door_opening <> 1 OR multi_door <> 1 THEN
HIDEPARAMETER "second_door_opening"
ENDIF
Juan
2023-01-16 12:02 AM - edited 2023-01-16 12:16 AM
Hi,
what you said in the first half of you description was
"if the door_opening and multi_door are both different than 1, then hide the parameter"
IF door_opening # 1 AND multi_door # 1 THEN HIDEPARAMETER "second_door_opening" ENDIF
***Not the outcome you describe in the second part of your description
what you said in the second half of your your description was
"Only if door_opening = 1 and multi_door = 1 the parameter should show, otherwise keep it hidden"
IF door_opening = 1 AND multi_door = 1 THEN
!!!Show the parameter
ELSE
HIDEPARAMETER "second_door_opening"
ENDIF
there is no "SHOWPARAMETER" command.
another way to write that in English would be:
"if the door_opening is different than 1 or multi_door is different than 1, then hide the parameter,
so only if door_opening = 1 and multi_door = 1 the parameter should show, otherwise keep it hidden."
IF door_opening # 1 OR multi_door # 1 THEN HIDEPARAMETER "second_door_opening" ENDIF
The AND/OR for exclusion combinations are sometimes confusing.
the # "not equal to" is on the Shift+3 key on the keyboard.
I hope this helps.