Hi Costin,
What database viewer are you using to see the contents of your table? I suspect this is a display issue due to the way you are viewing the database table. I can confirm from experience in a number of projects that Mendix stores the enumeration key in database columns (not the caption).
Also, is there an underlying problem this is causing in the application you are building?
Mike
***EDIT***
The sql statement you are building should be:
'INSERT into Product(ProductName,ProductDesc,ProductOwner,
ProductOpenDate,ProductStatus,ProductVersion,
ProductReleaseDate
)
VALUES (
'''+$Product/ProductName+''', '''+$Product/ProductDesc+''',
'''+$Product/ProductOwner+''',
''2020-03-03'',
''’ + getCaption($Product/ProductStatus) +’'',
'''+$Product/ProductVersion+''',''2020-03-03''
);'
Hi Mike,
I am using the SQL Server Management Studio.
Costin
What do you mean by an underlying problem?
This is the sql statement in the microflow:
'INSERT into Product(ProductName,ProductDesc,ProductOwner,
ProductOpenDate,ProductStatus,ProductVersion,
ProductReleaseDate
)
VALUES (
'''+$Product/ProductName+''', '''+$Product/ProductDesc+''',
'''+$Product/ProductOwner+''',
''2020-03-03'',
''$Product/ProductStatus'',
'''+$Product/ProductVersion+''',''2020-03-03''
);'
Hi Mike,
I will test this right now.
Thanks,
Costin
Hi Mike,
When using ''’ + getCaption($Product/ProductStatus) +’'' I am getting this
and when using ' + getCaption($Product/ProductStatus) +' (one apostrophe) it extracts the value ‘Development’ but interprets this as a column name.
This is the microflow