Lookups with selector-style not working as a lookup-field wi

Posted by Rollbase User on 19-Jun-2013 17:52

Why can we not "control" a lookup-field with a selector-style in the same way as we control yhe same field in a picklist-style? If I have a selector, I can't * disable the field (rbf_setFieldDisabled) * set the value to null (rbf_setFieldValue) Both function is working if I choose a picklist-style on the lookup-field.

All Replies

Posted by Admin on 20-Jun-2013 22:53

Hi Stein,



I know my answer will be far from your actual question because my answer is just a reference to a workaround that I have used in the past to solve your issue.



1. Disabling a selector

Opt 1. Hide the field itself (rbf_showOrHide or other js/jquery methods)

Opt 2. Hide the text input and lookup selector [will leave the label shown]

--- $('#R12345 img, #txtR12345').hide();



Handler. Upon hiding/disabling clear the value

--- $('#rbi_F_R12345 span').click(); //This clicks all [x] links automatically for a given lookup, also the answer to #2



2. Set the value of a lookup to null

- $('#rbi_F_R12345 span').click(); //This clicks all [x] links automatically for a given lookup



Hope this helps in a way,

Piscoso, Martin

Rollbase PH

This thread is closed