Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Someone know how can I read into the reload script value from text file.
for example, I have a text file which is including the number 91.
I want to run the reload script so it will take the number 91 from the text file (saving it as variable) and then will execute
for i=1 to 91
How can I do it?
Thanks,
Nimrod
Hi Nimrod,
You can read this from the txt file.
LOAD DField
FROM Data.txt;
LET vDField = FieldValue('DField', 1);
FOR I = 1 TO $(vDField) STEP 1
-Yoursourcode
NEXT
Hope, it will give you idea to read data from any external sources.
Regards,
Raj Kishor
I think in case of variable declaration u have to make it from qv script or from variable overview tab only.......
Regards,
Dushyant
it's exactly what I want... the question is how to do it.
Hi Nimrod,
You can read this from the txt file.
LOAD DField
FROM Data.txt;
LET vDField = FieldValue('DField', 1);
FOR I = 1 TO $(vDField) STEP 1
-Yoursourcode
NEXT
Hope, it will give you idea to read data from any external sources.
Regards,
Raj Kishor
Thx for your response.
how do I have to save this field into the txt file?
I will appreciate your response. thx.
Hello,
If you mean how to save the value you are going to read following Raj's code posted above, you can do that in a QVD file or TXT file, just make sure it has the field name you are going to use in the script, in this case "DField", creating a textfile with the following
DField91
Hope that helps.
Hi,
If I am well understanding you question then you need to read the variable from txt file. So in this case you need to create a txt file and define you varialbes there same as QlikView syntax. Then you can include that text file in you script from Edit->Include File. For exanple let's write a variable in txt file called vLoopLimit which should be written as under:-
Let vLoolLimit = 91;
So when you include this txt file into ur script you can easily access this variable.
How do I use this variable?