cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
james_decosta
Level 9

hello i want to reset the userdefined install anywhere variables

hello,
i have a requirement in which i need to reset the user input variables
I want to continue only if the user inputs the correct variables .If he inputs wrong variables, i will make him to move back to the previous panel and this process will continue untill he inputs the correct results.
For resetting the user input install anywhere variables.i use ruleProxy.setVariable("$USER_INPUT_RESULT_3$",null);
and then he can set the varaibles but it does not happen .
Can anyone suggest me some way how to reset the user input variables.
Labels (1)
0 Kudos
(13) Replies
Yves_Kreis
Level 7

null won't work, check the manual, i think there is a variable called $EMPTY_STRING$ with an alias as $NULL$. Use one of these instead.

Best Regards,
Yves

P.S.: I think it would be a good idea to read the whole manual once!
0 Kudos
james_decosta
Level 9

hi,
this time i tried with this variable
ruleProxy.setVariable("$USER_INPUT_RESULT_0","$NULL$");
ruleProxy.setVariable("$USER_INPUT_RESULT_1","$NULL$");
ruleProxy.setVariable("$USER_INPUT_RESULT_2","$NULL$");
ruleProxy.setVariable("$USER_INPUT_RESULT_3","$NULL$");
ruleProxy.setVariable("$USER_INPUT_RESULT_4","$NULL$");

but they are not getting reset.
can someone suggest some workaround
0 Kudos
Yves_Kreis
Level 7

Can you post your project?

Best Regards,
Yves
0 Kudos
james_decosta
Level 9

hello,
I am displaying a "GET USER INPUT ADVANCED" option in which i am asking for the user to input database sever information.i am asking the ipaddress,username, password,port number and database to connect to.
When he inputs wrong information i should not allow him forward untill he inputs correct information.
But this is my headache. When i input the information for the first time(say right usernames,password etc),a panel saying "DB connection is right " is displayed.When i move back to the previous panel and input wrong information this time then also it is displaying the same panel saying "DB connection is right ".
Similarily for the wrong username and password , it displays a panel saying "DB connection is not done properly,now when i move and input the right information also then also it is displaying the "DB connection is not done properly " panel.
What shall i do???? any suggestions please.
0 Kudos
Yves_Kreis
Level 7

Can you post your project?

Best Regards,
Yves
0 Kudos
james_decosta
Level 9

it asks for databasess use typical install set
0 Kudos
james_decosta
Level 9

hi,
i am unable to upload the project as the size of the zip file is 9365KB.
What shall i do to upload my project.
and even when i tried to upload the .iap_xml,it is invalidating the file,please suggest
0 Kudos
pv7721
Level 20

By your project, we mean only the single .iap_xml file. This is the only thing we need (we don't need your resource files etc.) If you zip this single file I guess this should do the trick.
0 Kudos
james_decosta
Level 9

what shall i do or shall i paste it as a txt document
0 Kudos
purcellk24
Level 7

James,
There have been other posts that will solve your problem here.
If you notice your code
ruleProxy.setVariable("$USER_INPUT_RESULT_0","$NULL$");

There are 2 things wrong with it. 1. You are missing the end $ around the USER_INPUT_RESULT_0. 2. You are setting the variable with the value "$NULL$" which is what I assume you don't want.

You have to evaluate the $NULL$ from IA first.
Do something like this...
String emptyString = ruleProxy.substitute("$NULL$");
ruleProxy.setVariable("$USER_INPUT_RESULT_0$", emptyString);


Also, there have been other posts on this forum explaining that to upload your project (.iap_xml) file, you should zip it first.
0 Kudos
pv7721
Level 20

Take your single .iap_xml file and zip it! Then upload the resulting archive!
0 Kudos
james_decosta
Level 9

the file is attached herein
0 Kudos
Geetha_Reddy
Level 2

Hi every body the user defined IAvariables can be refreshed easily if we write a custom panel. I am writing a sample panel code as below:

import com.zerog.ia.api.pub.CustomCodePanel;
import com.zerog.ia.api.pub.CustomCodePanelProxy;

public class TradescopeOptionsPanel extends CustomCodePanel {
boolean inited=false;

public boolean setupUI(CustomCodePanelProxy customCodePanelProxy) {
if(!inited)
{
//all your code for designing the panel goes here
inited=true;
}
return true;
}


As above we need to declare a boolean variable "inited" as false and make it true after the setupUI execution. It wrks,chk it
0 Kudos