on 08-02-2011 12:59 PM
Hi,
I am using Radiobutton UI Element.
I have requirement of taking 5 Radiobutton in which user can only select 1 value.
So I have created 5 Radiobutton . I have binded KeytoSelect property to different value
Say
For
RD1 its LA
RD2 its LB
RD3 its LC
RD4 its LD
RD5 its LE
So i have bound all these radiobutton to one attribute of node whose cardanality is 1 : 1 and type char2.
So when i execute it , on any event on screen it is giving me error
'The value entered is not in the list of allowed values.'
So i could not found the reason why it is coming. I have also tried to make one data element and domain and try to put
the values like LA to LC in its fixed value but again it is giving the same error.
Please suggest
Thanks
Ankesh
Have you used RADIO_BUTTON_GROUP_BY_IDX or RADIO_BUTTON_GROUP_BY_KEY? And check the fixed values that you have used. You should use LA rathen than 'LA'.
You need to do some coding for radio button ui element and attach an event for eg. ON_SELECT to it.
Eg. I have 4 radio buttons and bound it to attribute with domain having fixed values 1,2,3 and 4.
Then do the coding in method ONACTIONON_SELECT that is attached to UI Element radio button.
Here RADIO_BUTTON_GROUP_BY_KEY is used.
data : str type string.
str = wdevent->get_string('KEY').
if str = '1'.
CALL METHOD wd_context->set_attribute
EXPORTING
index = USE_LEAD_SELECTION
value = ' radio button 1 selected'
name = 'DISPLAY'
.
where DISPLAY is attribute of type string.
ELSEIF str = '2'.
CALL METHOD wd_context->set_attribute
EXPORTING
index = USE_LEAD_SELECTION
value = ' radio button 2 selected'
name = 'DISPLAY'.
ELSEIF str = '3'.
CALL METHOD wd_context->set_attribute
EXPORTING
index = USE_LEAD_SELECTION
value = ' radio button 3 selected'
name = 'DISPLAY'
.
ELSEIF str = '4'.
CALL METHOD wd_context->set_attribute
EXPORTING
index = USE_LEAD_SELECTION
value = ' radio button 4 selected'
name = 'DISPLAY'.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ankesh,
Your radio button configuration looks perfect. I dont see any problem with it. Just for clarificaton. Due to any other fields in the UI like DropDownByIndex / DropDownBy Key / Input field with Suggest values enabled?
If so then I suspect the problem might be with the other fields. Normally this error occurs, if you enter some values in the input enabled field and if this value is not list of allowed values. Check it out.
BR, Saravanan
Hi,
did you enter the keyToSelect values inside quotes ('LA' instead of LA) to define them as character strings? If not, this might be the problem...
Regards,
Trond
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.