How to Convert Enumeration Values into Numeric and Send it to back to SAP

2
Hello All, I have my Enumeration Values in a Mendix field like this, Car Repair Bike Repair Motor Repair   But when I send these values back to SAP, I would like to send these as specific codes, I.e. Car Repair -→ Code ‘201’ Bike Repair -→ Code ‘202’ Motor Repair -→ Code ‘203’ Can anyone please let me know, how to achieve this. Thanks in advance.   Regards, Venu
asked
3 answers
6

Here is the view by microflow for clearer explanation

answered
2

Hi,

In a microflow have an exclusive split on the enumeration and then on each outgoing flow, you can create a variable of type integer with the number/code belonging to that enum. 

That variable can then be passed to where you want.

 

 

answered
0

You can also create an enum that has the captions Car Repair, Bike Repair, Motor Repair but the name as 201,202,203.

Then the user sees  Car Repair, Bike Repair, Motor Repair etc, but in your database you store 201, 202, 203. You can also use getName($MyVar) to get the code or getCaption($MyVar) to get the readable value.

Hope this helps

answered