on 05-17-2007 11:11 AM
Hello Alll
how can i set the value of an EVS as blank
thanks
kaushik
Hello Sumit
the scenario is :
i have an EVS , well populated now if i enter something in EVS manually "test" and this does not exist in the valueset and now if i try to save the data , it says "Character string "test" does not exist in the set of allowed values"
and now at this point i want that on saving anything that was typed in teh EVS gets cleared and data gets saved.
any code hint would be very helpful
thanks
kaushik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kaushik,
First Create a variable svs2 of type IModifiableSimpleValueSet globally. Let ur local valueset variable be svs1.
After populating the values in ur local valueset variable(ie. in svs1), assign that varibale to svs2. Also make the submit action as <b>nonvalidating</b> by checking the property of action. Then at the time of submission, do the following.
String key=wdContext.currentContextElement().get<EVSattribute>();
if(svs1.containsKey(key))
{
//NO problem
}
else
{
wdContext.currentContextElement().set<EVSattribute>(null);
}
Hope this will be helpful
Regards
Fahad Hamsa
Hi ,
1. You need to add the entered value..
For onEnter event of the input field, create a non -validating action..
inside the event handler.. u can write..
String val = wdContext.currentContextElement().getDropdownVal();
IWDAttributeInfo info = wdContext.getNodeInfo().getAttribute("dropdownVal");
IModifiableSimpleValueSet svs = info.getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();
svs.put(val,val);
2. To set null , in the same event handler section..
add a line..
wdContext.currentContextElement().setDropdownVal("");
Regards
Bharathwaj
Message was edited by:
Bharathwaj
Hi Kaushik,
Just clear the value set associated with EVS.
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.