2021-10-21 05:04 AM
I have an expression:
I am intended to use in an interactive schedule (Floor plan KEY), if an element has a description entered then show that, if not shows the name, if the name is blank as well (-) then show the complex profile name, if it's not a complex profile then show the composite name etc.
What I'm getting thou is "---" apart from the complex profile.
Now I haven't finished yet so I know the composite isn't showing up, but I would have thought the names and descriptions would show up.
Solved! Go to Solution.
2021-10-28 03:38 AM
I have another query, I'm not sure my description alone will be clear enough but I think the example might be.
I want to know if you can have an IFS function that has multiple logical tests.
In the virtual model there are various elements that have 3 properties in particular that I want to display depending on their values.
I'll use phones as an example, as they are pretty standard internationally.
The 3 Properties are:
So if an element only has the name populated I want it to read "Mobile phone"
If the element has the Manufacturer and Name I want it to read "Apple Mobile Phone"
If the element has the Product and Name I want to read "iPhone Mobile Phone"
If the element has the Manufacturer, Product and Name I want it to read "Apple iPhone Mobile Phone"
Not a perfect example but hopefully conveys the idea.
I'll fill in the gaps for commas and spaces etc.
2021-10-28 03:48 AM
Rather than using IFS functions, can you create a 4th property that joins or merges the other three properties?
That way if they are blank they will be left out.
Then use the 4th result for what you want.
Barry.
2021-10-28 03:53 AM - edited 2021-10-28 03:54 AM
Thanks Barry
Yeah, something like that might work, the values aren't truly blank as they have a "-", by default. But for the first 3 properties I could have an IF to the effect of if it's "-" show nothing [ ("") ?] but if it's populated then show the value.
2021-10-28 06:02 AM - edited 2021-10-28 09:07 AM
IFS ( AND ( {Property:Phases/Manufacturer} <> "", {Property:Phases/Product} <> "", {Property:Phases/Name} <> "" ), TEXTJOIN ( " ", TRUE, {Property:Phases/Manufacturer}, {Property:Phases/Product}, {Property:Phases/Name} ), AND ( {Property:Phases/Manufacturer} <> "", {Property:Phases/Name} <> "" ), TEXTJOIN ( " ", TRUE, {Property:Phases/Manufacturer}, {Property:Phases/Name} ), AND ( {Property:Phases/Product} <> "", {Property:Phases/Name} <> "" ), TEXTJOIN ( " ", TRUE, {Property:Phases/Manufacturer}, {Property:Phases/Name} ) )
The above assumes that all three custom properties are available for any element in question.
If any property is not available, the expression will fail. This is the reason that a sequence of three was used in the first question because for any element only one of the profiles would be available. Also the reason a fourth sequence combining everything would not be valid. If any of one of the three properties above would not be made available to a particular element, you would have to go to the sequence method again or just let it fail.
EDIT: Or a simpler method if this is what you had in mind???
TEXTJOIN ( " ", TRUE, {Property:Phases/Manufacturer}, {Property:Phases/Product}, {Property:Phases/Name} )