Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have the following 3 variables
SET iProduct = 1;
SET iCustomer = 0;
SET iUnit = 1;
I want to create a Sub Routine that will look at the value, and if the Value is 1 then read from the Script file.
I can only get it working for the first file which is product.qvs
Here is what I have but it's not working
SUB Extraction
IF $(iProduct) = 1 THEN
$(Must_Include=$(includePath)product.qvs);
ELSEIF$(iCustomer) = 1 THEN
$(Must_Include=$(includePath)customer.qvs);
END IF
END SUB
I will have about 15 tables and I want to create a nested IF THEN ELSE Statement to load the files if the Value is equal to 1
Thanks
Alan
Hi All,
I got it working by using Separate IF Statement within the routine
like the following
SUB Extraction
IF $(iProduct) = 1 THEN
$(Must_Include=$(includePath)product.qvs);
END IF
IF $(iCustomer) = 1 THEN
$(Must_Include=$(includePath)customer.qvs);
END IF
IF $(iUnit) = 1 THEN
$(Must_Include=$(includePath)unit.qvs);
END IF
END SUB
Hi,
Instead of Creating variable with SET keyword
You can try with LET Keyword
Hope it will solve your issue.
Regards
Hi All,
I got it working by using Separate IF Statement within the routine
like the following
SUB Extraction
IF $(iProduct) = 1 THEN
$(Must_Include=$(includePath)product.qvs);
END IF
IF $(iCustomer) = 1 THEN
$(Must_Include=$(includePath)customer.qvs);
END IF
IF $(iUnit) = 1 THEN
$(Must_Include=$(includePath)unit.qvs);
END IF
END SUB
If anyone has a better way of doing this please share
Hi,
Have try writing Else if seperately
like,
SUB Extraction
IF $(iProduct) = 1 THEN
$(Must_Include=$(includePath)product.qvs);
ELSE IF $(iCustomer) = 1 THEN
$(Must_Include=$(includePath)customer.qvs);
End If
END IF
END SUB
Regards
Hi Max,
I tried that but it would only ever read the first table/script file
But thanks anyway
Regards
Alan