2024-08-07 04:29 PM - edited 2024-08-07 04:30 PM
Hi,
I want to add an automatic property to doors depending on which zone the open into. All is fine when the door opens into a zone but when there is no zone (exterior doors) the "to zone" gives <Undefined> and I'd like to change that to "Ext door" or something else but I can't figure out how to do this?
Anyone smarter?
/Mats
IFS
(
CONTAINS (To Zone}; "A" ); "Type 1";
CONTAINS (To Zone}; "B" ); "Type 2";
CONTAINS (To Zone}; "C" ); "Type 3";
CONTAINS (To Zone}; "D" ); "Type 4"
)
Operating system used: Windows
2024-08-07 04:51 PM
Hi, you could try:
IFS(
CONTAINS (To Zone}; "A" ); "Type 1";
CONTAINS (To Zone}; "B" ); "Type 2";
CONTAINS (To Zone}; "C" ); "Type 3";
CONTAINS (To Zone}; "D" ); "Type 4";
To Zone="";"Ext door")
or maybe this
IFS(
CONTAINS (To Zone}; "A" ); "Type 1";
CONTAINS (To Zone}; "B" ); "Type 2";
CONTAINS (To Zone}; "C" ); "Type 3";
CONTAINS (To Zone}; "D" ); "Type 4";
TRUE; "Ext door"
)
Hope this works out
2024-08-07 05:37 PM
Nope didn't get it to work.
I can use ISUNDEFINED to give undefined a vale but can't seem to use it in my IFS sequence nor using it before the IFS.
2024-08-07 05:54 PM
I think I managed...by nesting the IFS into the IF... IF only I could be faster with these expressions...
IF (
ISUNDEFINED(To Zone);
"EXT";
IFS (
CONTAINS(To Zone; "SOV");
"mjuk och fin";
CONTAINS(To Zone; "HALL");
"halltröskel";
CONTAINS(To Zone; "WC");
"das tröskel";
CONTAINS(To Zone; "KÖK");
"köttig tröskel"
)
)