on 07-14-2008 11:28 AM
Hi all
I have a table with 2 columns. column1 is of text view and column2 is Input field.
The user should not be allowed to enter a value in the column2 ( input field) greater than the value populated in column1(textview).
So for Eg; if the column1 is populated with value 100, The user should not be able to enter a number greater than 100 in the column2 input field.
Please let me how this can be achieved.
I appreciate the help.
Thanks
You can have onEnter Event for the InputField to check this
use the following code to achive this
data: lr_element type ref to if_wd_context_element.
data: ls_node type <node_type>
lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).
lr_element->get_static_attributes( static_attributes = ls_node ).
if ls_node-col1 = 100 and ls_node-col2 > 100.
raise error
endif.
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is nothing that you are going to be able to do currently in WD clientside that will allow you to enforce this rule. You will have to code some validation logic that reads the context attributes and produces an attribute message when they have violated this view. I would probably place this logic in WDDOBEFOREACTION method of your view, this way it gets check before any actions fire. You could place an onEnter event handler on the input fields. Down the road, we will add an OnChange event handler to the inputField that would allow for you to check the values when losing focus on the field - but that is something that is still in development.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
two duplicate posts.. some thing was wrong.
My previous post is duplicated here strange.
Edited by: Abhimanyu Lagishetti on Jul 14, 2008 12:37 PM
Edited by: Abhimanyu Lagishetti on Jul 14, 2008 12:39 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.