cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with &SFSY-PAGE& and &SFSY-FORMPAGES& in Smartforms

Former Member
0 Kudos

Hi ,

My requirement is to print 'Continue...' If the current page # is less than the total number of form pages and print '...Last Page' If the current page # is equal to the total number of form pages. I used condition node to check SFSY-PAGE < SFSY-FORMPAGES, if this true printing 'Continue...', If not then print '...Last page'. But endup printing always '...Last page'. I debuged though the code and surprised to see that the SFSY-PAGE and SFSY-FORMPAGES have always same value. They are getting updated same time. So at the time I do the check they are same, so always printing the text 'Last page...'

In my Page > General Attributes > Page counter, I selected formt 1,2,3.. and Mode as Increase counter.

Any one have a clue of this ? Please let me know how to solve it.

Thank you,

Surya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Surya,

try this....

create a window of type 'final window' and place the same code used by you in this window. It may work as final window will be processed after all the remaining windows are processed.

regards,

Ravi

Former Member
0 Kudos

Hi Ravi,

That worked. Awarded full points. Thanks to all repliers.

Thank you,

Surya

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Surya, i understand your problem, to get the output in your desired format follow my suggestion.

instead of using command node to check the SFSY-PAGE < SFSY-FORMPAGES use the ALTERNATIVE LOOP from flow logic, in that give the comparison fields SFSY-PAGE and SFSY-FORMPAGES. and create program line in the TRUE node and FALSE node write continue and last page in the program line.

Hope it will work. reward points if helpful

Former Member
0 Kudos

Hi Pradeep,

I did not use command node to check the SFSY-PAGE < SFSY-FORMPAGES. I used Alternative, i.e condition node.

I did not understand your answer. What is ALTERNATIVE LOOP from flow logic ? I see two nodes ALTERNATIVE and LOOP. Also you mentioned to create program line in the TRUE node and FALSE note and wite 'Continue' and 'Last page'. You mean to use WRITE statement ?

Please let me know if you have any questions.

Thank you,

Surya.

Former Member
0 Kudos

Try to use :

IF SFSY-PAGE<b>(C)</b> < SFSY-FORMPAGES<b>(C).</b>

Now see the results..

Thanks

Seshu

Former Member
0 Kudos

Hi Seshu,

Thanks for your quick response. But, using (C) in condition node is erroring out. error: Field type "I" does not permit subfield access.

Thank you,

Surya

Former Member
0 Kudos

Then declare two variables like charcter and move the values SFSY-PAGE , SFSY-FORMPAGES to local varaibles.

now put the condition.

Thanks

Seshu