INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MCWS: need to get list of all defined fields in MC  (Read 2227 times)

MrBiff

  • World Citizen
  • ***
  • Posts: 151
MCWS: need to get list of all defined fields in MC
« on: June 11, 2016, 12:57:38 pm »

I don't see how I can get a list of the field names defined in MC from MCWS.  Can you make a way with MCWS to do this?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42323
  • Shoes gone again!
Re: MCWS: need to get list of all defined fields in MC
« Reply #1 on: June 11, 2016, 01:01:25 pm »

I think that's a pretty good idea.  I'll take a look Monday.
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42323
  • Shoes gone again!
Re: MCWS: need to get list of all defined fields in MC
« Reply #2 on: June 13, 2016, 06:42:58 am »

Next build will have this function:
MCWS/v1/Library/Fields

The results will be an XML block of fields with the name of each field and the expression for a calculated field.  It's pretty expandable, so we could easily add more this way.
Logged
Matt Ashland, JRiver Media Center

fredele

  • World Citizen
  • ***
  • Posts: 165
Re: MCWS: need to get list of all defined fields in MC
« Reply #3 on: May 30, 2017, 01:08:38 am »

+1 for this !  :) :)

Well, now that we've got the fields, the client who wants to display them cannot do it the correctly, because we do no get the TYPE of the Field.(string, integer,float,list,percent and date are available ...).
A turnaround is to "hardcode"  on client side the corresponding type of each field.(ex: a  dictionnary in python)

Also, on field creation with MCWS , only two types are available (numeric or string) : this is not so important because the correct display of a list could be configured later in MC while the fields value are set ... but it could be useful to have all the types available ...


Logged
Pages: [1]   Go Up