The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
How can i do an if that must meet two conditions, if there is no "and" function?
I´m using the operator Generate Attributes and i want to generate an attribute from 2 existing ones, and the problem is that i have to use an if expression but it must meet two conditions. As far as i´m concerned there is not a function like "AND" o yes?
Thank you!
Thank you!
0
Best Answers
-
varunm1 Member Posts: 1,207 UnicornIs the attribute type of "Tercerizado" text? I see that "contains" only works for attribute type Text. If it is polynomial, you can use nominal to text operator to convert the attribute type to text. Also the text in quotations is case sensitive.
I tried && operator with a new attribute created and it works fine for me. If it still doesn't work, try creating "producto Generico" in generate attribute and then again use another generate attribute to create this "if" based column after producto generico. Test and see how it goes.Regards,
Varun
https://www.varunmandalapu.com/Be Safe. Follow precautions and Maintain Social Distancing
5 -
tftemme Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, RMResearcher, Member Posts: 164 RM ResearchHi @cdaponte
The problem with the second conditions in the last 2 if conditions is, that you have put the Producto Genérico into "". So RapidMiner takes "Producto Genérico) as a normal String (and not using it as the attribute) and compare it to the other String ("PV"). This obviously results always in false. So although the syntax of the expression is correct (thats the only thing RM can check), the condition will never be fulfilled.
Just change "Producto Genérico" to [Producto Genérico] and your if conditions should work.
Best regards,
Fabian7
Answers
Scott
Can you provide your XML code for this process? It is available in XML window (View --> Show Panel --> XML)
Varun
https://www.varunmandalapu.com/
Be Safe. Follow precautions and Maintain Social Distancing
It appears that the expression is correct, but the results are not the expected, the 2 last if does not work. "Producto Genérico" is an attribute that i previously created.