Enumeration Microflow error Invalid argument types MyFirstModule.Order and String

-1
Hello, I’m trying to implement EXCEL import according to this tutorial. I’m getting an error after creation of the microflow, which should determine the enumeration value of the attribute based on the input from the Excel file. Step-by-step: I have an “Order” entity with the “OrderStatus” enumeration attribute. This is a calculated attribute and I generated an empty microflow to define its value.   I added the following values to the enumeration attribute:   And added the expression from the tutorial to the microflow. Since the microflow generated by default is slightly different from the one in the tutorial, I edited the expression to solve the problems (renamed variable to “Order” and made “open”, “processing”, “complete” lowercase). The problem is that I still have 3 errors “Invalid argument types MyFirstModule.Order and String”. How should I solve these errors? Thank you in advance!
asked
1 answers
-1

In your case you are comparing the object against a string value which is not possible.

Take a look at the tutorial again, you should:

  1. Change the microflow and change the input parameter to a string value instead of an entity. Then you can compare $Order to ‘open’ for example/
  2. If you do not have a very specific use case for it, don't use a calculatted attribute. Make it a normal one. The microflow can be used within the import template in order to set the correct status.
  3. Use the microflow to parse the enumeration with, just as in point 27 of the tutorial
answered