How to remove/clear selected lookup item in the client side

Posted by ithrees on 10-Mar-2017 00:18

Hi All,

With regarding to my previous post for the same purpose I was using rbf_removeObject() function (undocumented one) with Rollbase earlier.

rbf_removeObject(relatedFieldIntegrationName, relatedObjectId, relatedFieldIntegrationName); 


But with the latest version with Kendu controls this is not working as expected.

What is the function that is being used for this purpose in the latest Rollbase to work with Kendu UI?

Thanks & Regards,
Ithrees

Posted by Mohammed Siraj on 10-Mar-2017 00:48

With NewUI revision, we have extensively revised Client-side SDK support.

For form pages, every field will have a field context object with API methods that abstract out form field interaction i.e. set/get values, show/hide, enable/disable and similar, independent of the field type. Use client-side API rbf_getFieldContext() to retreive such an object for a given field.

For a complete list of API methods, please refer:
https://community.progress.com/community_groups/rollbase/f/25/t/22047
http://documentation.progress.com/output/rb/doc/#page/rb%2Frbf-getfieldcontext().html

For the given requirement, to unset a lookup field value,

rbf_getFieldContext('field1').setValue(null); //where field1 is the integration name of lookup field.

You may also want to consider leveraging other Client-side SDK provisions like:

PageContext: https://community.progress.com/community_groups/rollbase/f/25/t/22077

http://documentation.progress.com/output/rb/doc/#page/rb%2Fclient-side-javascript.html%23

All Replies

Posted by Mohammed Siraj on 10-Mar-2017 00:48

With NewUI revision, we have extensively revised Client-side SDK support.

For form pages, every field will have a field context object with API methods that abstract out form field interaction i.e. set/get values, show/hide, enable/disable and similar, independent of the field type. Use client-side API rbf_getFieldContext() to retreive such an object for a given field.

For a complete list of API methods, please refer:
https://community.progress.com/community_groups/rollbase/f/25/t/22047
http://documentation.progress.com/output/rb/doc/#page/rb%2Frbf-getfieldcontext().html

For the given requirement, to unset a lookup field value,

rbf_getFieldContext('field1').setValue(null); //where field1 is the integration name of lookup field.

You may also want to consider leveraging other Client-side SDK provisions like:

PageContext: https://community.progress.com/community_groups/rollbase/f/25/t/22077

http://documentation.progress.com/output/rb/doc/#page/rb%2Fclient-side-javascript.html%23

Posted by ithrees on 10-Mar-2017 03:07

Hi Siraj,

Thank you for your reply and it worked. And got to know more about client side scripts.

Regards,

Ithrees.

This thread is closed