2023-05-14 07:41 PM
Is it possible to add a value of a expression to a option set?
for example:
In my expression i multiplied 2 number with each other (3,6 x 10 = 36). In my option set i have the values of 10-20-30-40-50-60-70-80-90-100. I want to have the value of 36 in my option set. Is there any possibility to make this happen?
Solved! Go to Solution.
2023-05-16 03:38 AM - last edited on 2023-05-16 04:59 PM by Laszlo Nagy
Sorry, this post got marked automatically as spam because of the code.
I have now released it.
Feel free to spread the expression out a bit in the editor - it will still work.
If that first expression works, then it should be a matter of just doing this (I hope).
I have marked what I think you need to change in red....
IFS (
{Property:Zone/Zone Category} = "Toevoer Slaapkamer"; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} <= 25; 25; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} >= 72; 72; {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} ) )
,
{Property:Zone/Zone Category} = "new_zone"; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} <= 10; 10; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} >= 90; 90; {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} ) )
,
{Property:Zone/Zone Category} = "new_zone"; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} <= 10; 10; IF ( {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} >= 90; 90; {Property:Ventilatie/Ontwerp Debiet (m³\/h.m²)} ) )
)
Barry.
2023-05-16 09:12 AM
Dear Barry Kelly
I want to formally thank you for all the time and effort you put in to this. You have been very grateful and helpful in making this work. I used your example and tried it myself. With a few changes in the comma it works. Thank you very much for everything.
Kjell Syryn
2023-05-16 09:17 AM - edited 2023-05-16 09:17 AM
Not a problem.
I didn't test it myself.
Would you mind posting the expression that does work if you don't mind, just so those following can get the correct information as well?
Or just point out where I went wrong.
Don't worry if it disappears as a spam post - I will release it.
If you have it working with all 10 zones in your expression, that is fine, I can always edit it back to a smaller sample.
Barry.
2023-05-16 10:56 AM - last edited on 2023-05-16 05:01 PM by Laszlo Nagy
Here you can find the solution for setting a specific min/max to your zone category.
IFS ( {Property:Zone/Zone Category} = "Toevoer Slaapkamer"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 25; 25; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 72; 72; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );
{Property:Zone/Zone Category} = "Toevoer Woonkamer"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 75; 75; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 150; 150; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );
{Property:Zone/Zone Category} = "Toevoer Studeerkamer"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 25; 25; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 72; 72; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );
{Property:Zone/Zone Category} = "Toevoer Speelkamer"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 25; 25; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 72; 72; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );
{Property:Zone/Zone Category} = "Afvoer Keuken"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 50; 50; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 75; 75; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );
{Property:Zone/Zone Category} = "Afvoer Badkamer"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 50; 50; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 75; 75; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );
{Property:Zone/Zone Category} = "Afvoer Was- en droogplaats"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 50; 50; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 75; 75; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );
{Property:Zone/Zone Category} = "Afvoer open keuken"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 75; 75; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 75; 75; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) );
{Property:Zone/Zone Category} = "Afvoer WC"; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} <= 25; 25; IF ( {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} >= 25; 25; {Property:Ventilatie/Ontwerp Debiet - per vierkante meter} ) ) )
2023-05-16 11:21 AM
@kjell syryn wrote:
With a few changes in the comma it works.
Interesting.
It must be a language/system setting.
You seem t be using semi-colons ( ; ) as your separators in the expression.
My system uses just a comma ( , ).
Glad you got it working.
So for everyone playing along at home, make sure you use the correct separator as set by your operating system.
Barry.
2023-05-16 05:04 PM - edited 2023-05-16 05:05 PM
It depends on the decimal place character used in the operating system.
If your operating system uses . (decimal point), then you have to use , (comma) in Property expressions.
If your operating system uses , (comma) as a decimal separator (like in Hungary), then you have to use ; (semicolon) in Property expressions.