Hi,
Have configured an object type connection to external SQL database.
Select statement works fine and used a [NO_] column from the external database as Object ID in M-Files (saved as external ID in the M-Files database). The same value is also saved in a regular property in M-Files using a simple "[No_] as [CustNo]" configuration in the Select statement.
Although the [No_] column in the external database has unique values it is not actually the primary key in that database. When you create new records you have to insert a value into that column. Therefor, when creating the Insert statement in M-Files Admin I need to provide a value for that [No_] column. Obviously the value is not present in M-Files at that point in time, so my idea was to simply reverse the statement and use "[CustNo] as [No_]" in the Insert statement in order to fetch the value from CustNo in M-Files. This is accepted when saving the configuration in MF Admin, but I get an error when attempting to create new objects in M-Files:
Adding to the external database failed.
Processing of the external object type or value list "136-4636, ExtID: " failed.
InsertItem failed.
Incorrect syntax near the keyword 'as'.
So my plan didn't work.
Hope one of you might have an idea on how to get around this issue?