Page 3 of 3
Re: Syntax If on Occurrences Variable
Posted: January 6th, 2017, 2:16 am
by khurshid.arshad
Dear Langitluna
Based on what i have understood, please see syntax.
Code: Select all
PROC GLOBAL
numeric FlagRow;
PROC QQ_FF
PROC FQ1
If curocc()=1 and $=4 then
FlagRow=1;
skip to FQ1(10);
else
endif;
if Curocc()=10 and FlagRow =1 then
move to FQ1(FlagRow);
else
endif;
arshad.
Re: Syntax If on Occurrences Variable
Posted: January 7th, 2017, 12:28 pm
by langitluna
Thanks arshad.
I tried but its not work. sorry for my ignorance.
For Example:
FQX Rooster: have values to entry does not in order: 1,4,3,6
if value 4 then skip to FQO. FQO is string alpha. Then after FQO entered, then back to FQX to continue others value, but after value 4.
Would you please see PQPROJECT1.zip
The next question for logic on variable E2A E2B and E2C that depend on FQY rooster.
E2A : IF FQY(1) = 1
E2B : IF FQY(2) = 1 OR IF FQY(3) = 1
E2C : IF FQY(4) = 1
I tried to use this logic but does not work:
on E2A Preproc if FQY(1)=0 then skip to E2B; else skip to E2C ..
Please see PQPROJECT1.zip
Please help me. Thank you very much
Re: Syntax If on Occurrences Variable
Posted: January 7th, 2017, 12:55 pm
by langitluna
I tried only put logic on E2A and E2B, as below.
Does it correct ? Please advice. Thanks
Code: Select all
PROC E2A
if FQY(2)=1 then
if FQY(3)=1 then
if FQY(4)=1 then
skip to FINISH;
else skip to E2C;endif;
else skip to E2B;endif;
else skip to E2B;endif;
PROC E2B
if FQY(4)=1 then
skip to FINISH;
Re: Syntax If on Occurrences Variable
Posted: January 8th, 2017, 11:01 am
by khurshid.arshad
Answer for first question:
Code: Select all
PROC PQPROJECT_QUEST
Preproc
FlagRow=0;
Code: Select all
If Flagrow>0 then
else
If $=4 then
FlagRow=curocc();
skip to FQO;
else
endif;
endif;
Code: Select all
PROC FQO
Preproc
if $<>"" then
skip to E2A;
else
endif;
Postproc
If Flagrow >0 then
if $ = "" then errmsg("Others. Please specify.");
reenter;
else
move to FQX(FlagRow);
endif;
else
endif;
Re: Syntax If on Occurrences Variable
Posted: January 8th, 2017, 11:44 pm
by langitluna
Thanks arshad. You are so kind.
very appreciate.
Re: Syntax If on Occurrences Variable
Posted: January 13th, 2017, 7:08 am
by langitluna
Dear Arshad
The logic is working fine. Can I just skip to FQX(3) after FQO rather than on last position on FQX?
Ss, If value I must enter on FQX are: 1,4,3,6 then :
After 4 (that: if FQX=4 then skip to FQO), then type specified on FQO, then back to FQX. Your logic would skip to FQX(2) which is the last position.
Could it possible to skip to FQX(), but after 4 . on this example on FQX(3). Then I just continue TO ENTRY 3 and 6. Please see the screenshot.
Thanks Arshad
Re: Syntax If on Occurrences Variable
Posted: January 14th, 2017, 5:55 am
by khurshid.arshad
Dear Langitluna
I hope it works. Please see syntax under "PROC FQX".
Code: Select all
PROC GLOBAL
Numeric Flagrow,i =0;
PROC PQPROJECT_FF
PROC PQPROJECT_QUEST
Preproc
FlagRow=0;
PROC FQX
onfocus
If Flagrow>0 then
i=1;
while i<=6 do
if curocc(PQPROJECT_REC)>=1 and $=4 then
i=curocc(PQPROJECT_REC);
move to FQX(1+i);
else
i=inc(i);
endif;
enddo;
else
endif;
Postproc
If Flagrow>0 then
else
If $=4 then
FlagRow=curocc();
Move to FQO;
else
endif;
endif;
PROC FQO
Preproc
if $<>"" then
skip to E2A;
else
endif;
Postproc
If Flagrow >0 then
if $ = "" then errmsg("Others. Please specify.");
reenter;
else
move to FQX(FlagRow);
endif;
else
endif;
a.