Getting the Value of picklist field using rbf_selectQuery()

Posted by Rollbase User on 12-Apr-2010 09:16

What is the syntax for getting the Value or Code of a picklist field, instead of the ID, while using rbf_selectQuery() on a portal page? I see you have rbv_api.getCodeById (objName, fieldName, id) for server-side processing; is there a similar function that could be used on the client-side? Thanks

All Replies

Posted by Admin on 12-Apr-2010 11:36

OK, I will try to add this client-side API. Please check after the next update.

Posted by Admin on 13-Jul-2010 05:09

What is the syntax for getting the Value or Code of a picklist field while using SOAP web service?

Posted by Admin on 13-Jul-2010 11:31

To get value (numeric item ID) of a picklist from SOAP you can use getDataObj() or selectValue() API. I will add new API to get item's code for given value. This API is currently available from client-side and server-side JavaScript API.

Posted by Admin on 20-Jul-2010 06:49

Hi,

already tried the getDataObj and selectValue methods. These methods return a particular picklist value from a record.

e.g:

getDataObj(sessionID,recordID).

var sql = 'SELECT Rank FROM USER'
selectValue(sessionID,sql);

These all return a single value based from an existing record. What if I needed all of the picklist values not from a record but the picklist definition.

The new method stubs you added returns a single value based from the code or ID.

The output for getIdbyCode() is an Id of item with matching integration code or -1 which is a single value not all of the picklist values or definition.

Hope this helps in clarifying the issue



Posted by Admin on 20-Jul-2010 11:56

I can extend getObjectDef() to supply this into. Or you can use UI to find out.

Posted by Admin on 21-Jul-2010 01:14

I think if we get it from the UI it wil not be dynamic as the information is not fed from the SOAP and we need to do this everytime a new picklist value is added. The getObjectDef will be great as we can use it to get information about the object dynamically.

Posted by Admin on 21-Jul-2010 11:15

Picklist info will be included into getObjectDef API after the next update.

Posted by Admin on 28-Jul-2010 04:36

Hi Pavel,

I tried the getObjectDef and it returns however in the list items it does not include the ID of the picklist. Can you include the ID for the picklist. Thanks..

Posted by Admin on 28-Jul-2010 04:38

Sorry it seemed to remove the characters..

I tried the getObjectDef and it returns "ListItems" however in the list items it does not include the ID of the picklist. Can you include the ID for the picklist. Thanks..

Posted by Admin on 28-Jul-2010 11:55

OK, I will.

This thread is closed