Hi,
I am having hard time to figure out how to use I created parameter in the java code. My script is using LR 11.52 with Java over Http protocol. I simply right click the value I want to replace with parameter and I am able to create it (highlight color in bold red). But when I try to compile the code in LR IDE, I got syntax errors...
Here is the code snipet:
public static void global_init() {
if (ready == false)
synchronized (lock) {
if (ready == false) {
try {
shifts = shift.readCSVFile("requestBody10.csv");
} catch (FileNotFoundException e) {
e.printStackTrace();
}
shift.replaceVariables(shifts,"requestBody10.xml");
shift = shifts.get({shiftsId}); // The input value is integer.
RequestObjectListBeanBA0=XmlBasedBinMemoObjectParsing.xml2bin("requestBody7.xml");
RequestObjectListBeanBA1=XmlBasedBinMemoObjectParsing.xml2bin("requestBody8.xml");
RequestObjectListBeanBA2=XmlBasedBinMemoObjectParsing.xml2bin("requestBody9.xml");
ShiftEditorBeanBA3=XmlBasedBinMemoObjectParsing.xml2bin("requestBody10.xml");
KBeanBA4=XmlBasedBinMemoObjectParsing.xml2bin("requestBody11.xml");
ready = true;
}
}
}
The parameter shiftsId has 2 simply rows of data: 1 and 2.
The compile errors are as follows:
illegal start of expression [MsgId: MERR-22986]
';' exepected [MsgId: MERR-22986]
Please help!!!