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

Get Selected Values from Multi Select Dropdown list

Former Member
Former Member
Hi Forum

Apologies if I'm asking a basic question here.

Given a completed Object card with a Multi Select Dropdown list property (which the user has added entries to), what API method can I use to get those values selected.

I thought it would be simple since I have the ObjVer of the completed card in question but I am finding it difficult to get an easy solution.

Any help would be greatly appreciated.
  • Hi lincolnvmcs,

    No problem about any question - we get the basic ones here, right the way through to the exceptionally complicated.

    An ObjVer is simply a collection of IDs which point to a specific version of an object on the server: www.m-files.com/.../index.html

    If you have an ObjVer then you need to actually retrieve the object's details from the system. There are a number of ways to do this, but perhaps the simplest is to use Vault.ObjectOperations.GetObjectVersionAndProperties: www.m-files.com/.../index.html

    The returned object has a Properties property which exposes all the PropertyValues that were on the metadata card. You can use this to find the specific PropertyValue you want, and then extract the value. In the case of a multi-select lookup, you need to use PropertyValue.Value.GetValueAsLookups: www.m-files.com/.../index.html

    This, unfortunately, then returns a set of lookup objects which are again a set of IDs that you need to resolve from the server.

    Does that help in general terms?

    Regards,

    Craig.
  • Let me just add one thing: normally you are interested in multiple properties of the object, so GetObjectVersionAndProperties is the easiest. If you are really only interested in a single one, then you can use Vault.ObjectPropertyOperations.GetProperty to get a single one: www.m-files.com/.../index.html

    Regards,

    Craig.
  • Former Member
    Former Member
    Thank you for your help Craig, that answers everything perfectly