smart logic template variables syntax
Posted: Fri Jan 05, 2024 1:03 am
I am trying to built a auto message for guest arrival instrucitons.
FOr the code of the door, i have different scenario and i am trying to buiit a smart logic around this with If insode if.
Here is my logic:
If there is a unique code for the door in the booking (in info code lockstate_pin) then use this for the apartemnt code. otherwise, 2 scenarios:
1st is if there is a code in the unitcode 2 tempalte, use it, if it is empty, use the room template 4.
here is what i Build but the second if doesn't work
[IFIN:LOCKSTATE_PIN:[BOOKINGINFOITEMS]:[BOOKINGINFOCODETEXT:LOCKSTATE_PIN]|[IF:[UNITNAME:1]::[ROOMTEMPLATE4]|[UNITNAME:1]]]
I tried both if individually like this [IFIN:LOCKSTATE_PIN:[BOOKINGINFOITEMS]:[BOOKINGINFOCODETEXT:LOCKSTATE_PIN]|]
[IFLIKE:[UNITNAME:1]::[ROOMTEMPLATE4]|[UNITNAME:1]]
It works as expected, but now i want the second if applied only if the first if is false
It is not very easy to trouble shoot the code, and I am a bit confused with special versions as it is not explain in the help what is the difference with the normal version
SOmeons can help with the syntax?
FOr the code of the door, i have different scenario and i am trying to buiit a smart logic around this with If insode if.
Here is my logic:
If there is a unique code for the door in the booking (in info code lockstate_pin) then use this for the apartemnt code. otherwise, 2 scenarios:
1st is if there is a code in the unitcode 2 tempalte, use it, if it is empty, use the room template 4.
here is what i Build but the second if doesn't work
[IFIN:LOCKSTATE_PIN:[BOOKINGINFOITEMS]:[BOOKINGINFOCODETEXT:LOCKSTATE_PIN]|[IF:[UNITNAME:1]::[ROOMTEMPLATE4]|[UNITNAME:1]]]
I tried both if individually like this [IFIN:LOCKSTATE_PIN:[BOOKINGINFOITEMS]:[BOOKINGINFOCODETEXT:LOCKSTATE_PIN]|]
[IFLIKE:[UNITNAME:1]::[ROOMTEMPLATE4]|[UNITNAME:1]]
It works as expected, but now i want the second if applied only if the first if is false
It is not very easy to trouble shoot the code, and I am a bit confused with special versions as it is not explain in the help what is the difference with the normal version
SOmeons can help with the syntax?