This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to map Number property with decimal type source column for ExtOTDS application?

In a External Object Type Data Source application,
Allowed data types: Text,Text (multi-line),Choose from list,Choose from list (multi-select),Boolean,Number (integer, 32-bit).

But I have many decimal and long type source column from external application and I need to map them with M-Files Properties. I tried with the answer in this question - https://community.m-files.com/forums-1552881334/f/general-discussion-feedback/8549/null-date-in-source-column-for-external-object-type-data-source-application-creates-issue-with-property-definition-how-to-solve-it but it didn't work.

There is workaround to save decimal/long source columns values in string property but it is not acceptable as per client's requirement. How to solve it? I greatly appreciate your kind help.

Parents
  • A bug was recently identified in the External Object Type Data Source (IML) template.  The issue is that the double data type is not mapped correctly.

    If you update your Visual Studio template package to the one released earlier this week, then create a new project, the issue should be solved in that project.

    To solve this on an existing project you need to update the various M-Files package references to >= 22.5.1, and then change the mapping in DataSourceConnection.cs such that double is mapped to DBTYPE_R8:

  • Thanks Craig, and what would be columnType for long data type

Reply Children
  • I don't believe I've had to use that.  You can see the maximum size that M-Files supports for integer property definitions at New Property Definition (m-files.com).  If you truly do need a value outside of the integer range then my assumption is that you would have to use a real data type and deal with the lack of precision.

    Do you actually need to support values that high, or is this simply a theoretical question?

  • I actually need it Craig. Yes real data type has precision issue with post decimal point, but we can compromise with that. So if I use real data type, would the ColmnType be DBTYPE_DECIMAL?

  • As I said: I haven't had to use it, so you may need to try it.

    I would suspect you would add an entry to the above collection for long to DBTYPE_R8, but that's just an informed guess right now.

    I probably won't have time to test this for a little while so, if you have a project, I'd start with the above approach and see where that goes.