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

Floats and or decimals in URL properties

Former Member
Former Member
Hey!

I'm trying to create dynamic URL:s to enable creating M-Files documents from external systems. For the most part I've managed to get all functionalities up and running, but I ran into a wall with floats or numbers with decimal points. Is there any way to create an URL to create an object in M-Files which sets a float property value?

For example the following URL works as intended and opens the window to create a new object with prefilled metadata:
m-files://newobject/AB123456-D123-4123-B0AE-12345678/0?property=100/103&property=1030/152-'SUP-123'&property=1031/156-'SVC-654'&property=1047/TWrittenText&property=1987/I1234

But if I try to add a value to a float property, I always simply get the wrong datatype error. For example these additions do not work:
&property=1234/I2345
&property=1234/T2345
&property=1234/R2345
&property=1234/F2345
&property=1234/D2345

It doesn't seem to matter whether there are actual decimal points on the value being transferred. The URL properties documentation doesn't provide any examples. Is it really possible, that floats or decimals simply are not supported?
  • Real number datatype is not directly supported in M-Files URLs currently, the supported datatypes are listed in the documentation (page 10). There is an improvement request with ID 133741 to add this in a future release, the ID will be listed in the release notes when the support is added.

    Depending on how you are creating your URLs you might be able to insert real numbers using a base64-encoded value as described in the documentation on page 6: "The expected format can be generated by creating the needed TypedValue [using M-Files API], calling its Serialize() method, and passing the serialized bytes to a Base64 encoder and then replacing each slash (/) with the string sequence {2}". In the URL you would use this as propertyvalue=/ -/.