Hello, I am asking for a little help for the realization of a property on Smart properties:
I would need to create a property with condition in relation to materials to fill in a field, so for example if XC48 put 125695 etc.
The problem is that I have a lot of different materials and for the moment I find myself with this code, but the problem is that it doesn't work:
IFF($Matiere=XC48;$Matiere=STUB;$Matiere=STUB GROUND ANNEALING h7 ⌀30;$Matiere=90MCVW 5 Z160CDV12;$Matiere=Z130 CWD V6.5.4.2;$Matiere=80MO8;$Matiere=HASBERG;$Matiere=45NCD16;$Matiere=40CMD8+s;$Matiere=Z38DCV5;$Matiere=60WC20;$Matiere=CARBIDE H40S;$Matiere=35CD4;$Matiere=FERROTIC|7326909890|
IFF($Matiere=AU4G;$Matiere=AG3;$Matiere=FORTAL HR;$Matiere=PLANCAPLUS 5083|7616999099|
IFF($Matiere=POM-C;$Matiere=POLYCARBONATE;$Matiere=ACCURA 25;$Matiere=IMP.3D ABS WIRE (RED);$Matiere=IMP.3D ABS WIRE (BLUE);$Matiere=IMP.3D ABS WIRE (WHITE);$Matiere=IMP.3D ABS WIRE (BLACK);$Matiere=IMP.3D ABS WIRE (GREEN);$Matiere=PEEK;$Matiere=ELADIP RED;$Matiere=ELADIP ORANGE;$Matiere=ELADIP BLUE|3926909790|
IFF($Matiere=STRUCTURAL STEEL;$Matiere=BOSCH PROFILE;$Matiere=ETIRE|7301200000|_)
)
)
)
To accumulate iffs in smartproperties, you have to write the rule for a subject and then insert the same rule in the unfulfilled condition.
Functional example:
IFF($Rayon=1.3|8|IFF($Rayon=2|12|IFF($Rayon=2.6|16|IFF($Rayon=4|25|IFF($Rayon=5|35|IFF($Rayon=8|50|IFF($Rayon=10|63|err))
With the color code to better understand:

And if necessary you chain the conditions one by one by checking the functionality between 2 additions. (You copy the initial rule for 1 subject and paste it instead of err for this case, for each addition.)
It's not very frendly to set up if you have a lot of conditions but in the end it works well afterwards.
1 Like
If I understood the intention correctly:
→ 7326909890 Steel Family
→ 7616999099 aluminum
→ 3926909790 plastics
→ profiles 7301200000
This should be:
IFF($Matiere=XC48|7326909890|
IFF($Matiere=STUB|7326909890|
IFF($Matiere=STUB RECTIFIE RECUIT h7 ⌀30|7326909890|
IFF($Matiere=90MCVW 5 Z160CDV12|7326909890|
IFF($Matiere=Z130 CWD V6.5.4.2|7326909890|
IFF($Matiere=80MO8|7326909890|
IFF($Matiere=HASBERG|7326909890|
IFF($Matiere=45NCD16|7326909890|
IFF($Matiere=40CMD8+s|7326909890|
IFF($Matiere=Z38DCV5|7326909890|
IFF($Matiere=60WC20|7326909890|
IFF($Matiere=CARBURE H40S|7326909890|
IFF($Matiere=35CD4|7326909890|
IFF($Matiere=FERROTIC|7326909890|
IFF($Matiere=AU4G|7616999099|
IFF($Matiere=AG3|7616999099|
IFF($Matiere=FORTAL HR|7616999099|
IFF($Matiere=PLANCAPLUS 5083|7616999099|
IFF($Matiere=POM-C|3926909790|
IFF($Matiere=POLYCARBONATE|3926909790|
IFF($Matiere=ACCURA 25|3926909790|
IFF($Matiere=IMP.3D FIL ABS (ROUGE)|3926909790|
IFF($Matiere=IMP.3D FIL ABS (BLEU)|3926909790|
IFF($Matiere=IMP.3D FIL ABS (BLANC)|3926909790|
IFF($Matiere=IMP.3D FIL ABS (NOIR)|3926909790|
IFF($Matiere=IMP.3D FIL ABS (VERT)|3926909790|
IFF($Matiere=PEEK|3926909790|
IFF($Matiere=ELADIP ROUGE|3926909790|
IFF($Matiere=ELADIP ORANGE|3926909790|
IFF($Matiere=ELADIP BLEU|3926909790|
IFF($Matiere=ACIER DE CONSTUCTION|7301200000|
IFF($Matiere=PROFIL BOSCH|7301200000|
IFF($Matiere=ETIRE|7301200000|
"")))))))))))))))))))))))))))))))))))))))))))))))))))
But as @sbadenis sense I think it would be wise to separate your conditions by adding a prerequisite to determine the 4 Families of Materials first:
IFF($Matiere=XC48|ACIERS|
IFF($Matiere=STUB|ACIERS|
IFF($Matiere=STUB RECTIFIE RECUIT h7 ⌀30|ACIERS|
IFF($Matiere=90MCVW 5 Z160CDV12|ACIERS|
IFF($Matiere=Z130 CWD V6.5.4.2|ACIERS|
IFF($Matiere=80MO8|ACIERS|
IFF($Matiere=HASBERG|ACIERS|
IFF($Matiere=45NCD16|ACIERS|
IFF($Matiere=40CMD8+s|ACIERS|
IFF($Matiere=Z38DCV5|ACIERS|
IFF($Matiere=60WC20|ACIERS|
IFF($Matiere=CARBURE H40S|ACIERS|
IFF($Matiere=35CD4|ACIERS|
IFF($Matiere=FERROTIC|ACIERS|
IFF($Matiere=AU4G|ALUMINIUM|
IFF($Matiere=AG3|ALUMINIUM|
IFF($Matiere=FORTAL HR|ALUMINIUM|
IFF($Matiere=PLANCAPLUS 5083|ALUMINIUM|
IFF($Matiere=POM-C|PLASTIQUES|
IFF($Matiere=POLYCARBONATE|PLASTIQUES|
IFF($Matiere=ACCURA 25|PLASTIQUES|
IFF($Matiere=IMP.3D FIL ABS (ROUGE)|PLASTIQUES|
IFF($Matiere=IMP.3D FIL ABS (BLEU)|PLASTIQUES|
IFF($Matiere=IMP.3D FIL ABS (BLANC)|PLASTIQUES|
IFF($Matiere=IMP.3D FIL ABS (NOIR)|PLASTIQUES|
IFF($Matiere=IMP.3D FIL ABS (VERT)|PLASTIQUES|
IFF($Matiere=PEEK|PLASTIQUES|
IFF($Matiere=ELADIP ROUGE|PLASTIQUES|
IFF($Matiere=ELADIP ORANGE|PLASTIQUES|
IFF($Matiere=ELADIP BLEU|PLASTIQUES|
IFF($Matiere=ACIER DE CONSTUCTION|CONSTRUCTION|
IFF($Matiere=PROFIL BOSCH|CONSTRUCTION|
IFF($Matiere=ETIRE|CONSTRUCTION|
""))))))))))))))))))))))))))))))))))))))))))))))
and a second condition to assign them the 10-digit code.
I think it will be easier to manage if you have to add materials...
IFF($Famille=ACIERS|7326909890|
IFF($Famille=ALUMINIUM|7616999099|
IFF($Famille=PLASTIQUES|3926909790|
IFF($Famille=CONSTRUCTION|7301200000|
"")))
=>Be careful, I was not able to test the above conditions. Caution.
Tip: Write the formulas in an Excel spreadsheet before transferring them to Smartproperties, it's simpler that way and easier to modify in the future.
… While digging a little deeper, I came across the " Custom " tab in the material editor and I wonder if it's not possible to create a new property with your 10-digit code directly affiliated with the material...

=> And for profiles, it is preferable to integrate the property directly into the file *. SLDLFP
1 Like
Not of; @Maclane
Not easy to explain so example with 1, 2, 3 condition.
FRFI ($Condition=A|$R Result=1|$R Result=Other)
FRFI ($Condition=A|$R result=1|FRFI ($Condition=B|$R result=1|$R result=Other))
FRFI ($Condition=A|$R result=1|FRFI ($Condition=B|$R result=1|IFF
($Condition=A|$R result=1|$R result=Other))
Basically, you start from the 1st line that you test.
Then you copy it and paste it each time instead of $R result=Other
And you change the value of your condition and the result (true)
I don't know friendly but that's how it works!
And even in a spreadsheet it's still a hassle... 
And good luck, I had killed myself at the task to enquire 15-20 conditions in another example! 
2 Likes
Okay I just understood, I did it again taking into account your advice and it works perfectly, thank you very much!
1 Like
… It took me a little while to interpret this sentence 
I have rewritten all the conditions as I understand them in my previous message.
Note: line breaks and blank lines exist only for comprehension...
And looking more closely, it looks more and more like XML... Am I mistaken?
It doesn't seem to me that Smartproperties can use this type of file (XML) but it is " easily " doable from a macro and to run it from Smartproperties and it allows you to create a document that is easier to read than the 20-25 nested conditions.
2 Likes
Yes it's better written that way for the line I understood correctly, @Maclane ! 
For Xml, it's quite possible, but the only possibility in conditional via smartproperties is to write it as I explained (no xml file) or via macro but it gets complicated for those not affiliated with the vba.
Please close the subject if your case is well resolved.
2 Likes