AGS PageDown looping beyond 2nd page

 7 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
kim
Basic Member
Posts: 15
Basic Member

    Hello:

    I am fairly new to the PF world so bear with me for a second while I explain my situation.   I am performing a simple AGS call to return all (every page) of data and have discovered that the AGS call will begin looping after page2 has displayed successfully even though the position-to field is populated.   Any help would be greatly appreciated.


     

    kim valdez

    [b]Providence Health & Services[/b]

     [b][i]"[/i][/b][b][i]Remember that silence is sometimes the best answer[/i][/b][b][i]."[/i][/b][i]

    [/i]Anonymous

     

     

    HRo6.2 has 10 detail lines.

    Here is the AGS call to HR06.2. I perform a branch to check if the RETURN_MSG= "More Records Exist - Use PageDown". If true, I change the to PageDown. 

     

    _PDL=&_TKN=HR06.2&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=Inquire&JBC-COMPANY=71&_DELIM=%09&_OUT=XML&_EOT=TRUE

    1st page of data (abbreviated to show first row and last row)

    AGS_PT_XMIT_NBR = 0

    AGS_PT_XMIT_NBR_2 = 0

    AGS_JBC_COMPANY = 71

    AGS_PRS_NAME = My Company Name

    [b]AGS_PT_JBC_JOB_CODE = 10050 (notice PT is page2 first entry)[/b]

    AGS_LINE_FCr0 =

    AGS_JBC_JOB_CODEr0 = 10001

    …..

    AGS_JBC_JOB_CODEr9 = 10045

    AGS_JBC_SALARY_CLASSr9 =

    AGS_JBC_BEG_SAL_RANGEr9 =

    AGS_JBC_MID_SAL_RANGEr9 =

    AGS_JBC_END_SAL_RANGEr9 =

    AGS_JBC_CURRENCY_CODEr9 =

    AGS_JBC_EFFECT_DATEr9 =

    AGS_BASE_CURRENCY_TABr9 = Base Currency2

    AGS_CALC_WINDOWr9 = Calculation

    AGS_JBC_BASE_BEG_SALr9 =

    AGS_JBC_BASE_MID_SALr9 =

    AGS_JBC_BASE_END_SALr9 =

    AGS_JBC_BASE_CURRENCYr9 =

    AGS_JBC_BASE_NDr9 = 0

    AGS_CHK_DECIMALSr9 = N

    AGS_JBC_CURR_NDr9 = 0

    AGS_JBC_PAY_RATEr9 = .0000

    AGS_JBC_MARKET_SALARYr9 = 0

    AGS__HK = 0071

    AGS_StatusNbr = 002

    AGS_RETURN_MSG = More Records Exist - Use PageDown

    AGS_RETURN_CODE = 0

    AGS_errorCode = 0

    AGS_informationCode = 0

    AGS_returnMessage = More Records Exist - Use PageDown

    AGS_outputData =

    Executing Branch Activity Branch9920.....

    Pushing Assign470 Activity in Execution Stack

    agsFC = PageDown

     

    Page2 successfully displays

    _PDL=&_TKN=HR06.2&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=PageDown&JBC-COMPANY=71&_DELIM=%09&_OUT=XML&_EOT=TRUE

    AGS_PT_XMIT_NBR = 0

    AGS_PT_XMIT_NBR_2 = 0

    AGS_JBC_COMPANY = 71

    AGS_PRS_NAME = My Company Name

    [b]AGS_PT_JBC_JOB_CODE = 11040 (page 3 should begin with this value)[/b]

    AGS_LINE_FCr0 =

    [b]AGS_JBC_JOB_CODEr0 = 10050 (same as page 1 value above)[/b]

    AGS_JBC_SALARY_CLASSr0 =

    AGS_JBC_BEG_SAL_RANGEr0 =

    AGS_JBC_MID_SAL_RANGEr0 =

    AGS_JBC_END_SAL_RANGEr0 =

    AGS_JBC_CURRENCY_CODEr0 =

    AGS_JBC_EFFECT_DATEr0 =

    AGS_BASE_CURRENCY_TABr0 = Base Currency2

    AGS_CALC_WINDOWr0 = Calculation

    …..

    AGS_JBC_JOB_CODEr9 = 11035

    AGS_JBC_SALARY_CLASSr9 =

    AGS_JBC_BEG_SAL_RANGEr9 =

    AGS_JBC_MID_SAL_RANGEr9 =

    AGS_JBC_END_SAL_RANGEr9 =

    AGS_JBC_CURRENCY_CODEr9 =

    AGS_JBC_EFFECT_DATEr9 =

    AGS_BASE_CURRENCY_TABr9 = Base Currency2

    AGS_CALC_WINDOWr9 = Calculation

    AGS_JBC_BASE_BEG_SALr9 =

    AGS_JBC_BASE_MID_SALr9 =

    AGS_JBC_BASE_END_SALr9 =

    AGS_JBC_BASE_CURRENCYr9 =

    AGS_JBC_BASE_NDr9 = 0

    AGS_CHK_DECIMALSr9 = N

    AGS_JBC_CURR_NDr9 = 0

    AGS_JBC_PAY_RATEr9 = .0000

    AGS_JBC_MARKET_SALARYr9 = 0

    AGS__HK = 0071

    AGS_StatusNbr = 002

    AGS_RETURN_MSG = More Records Exist - Use PageDown

    AGS_RETURN_CODE = 0

    AGS_errorCode = 0

    AGS_informationCode = 0

    AGS_returnMessage = More Records Exist - Use PageDown

    AGS_outputData =

    Executing Branch Activity Branch9920.....

    Pushing Assign470 Activity in Execution Stack

    agsFC = PageDown

     

    Page3 is repeating page2 data

    _PDL=&_TKN=HR06.2&_EVT=CHG&_RTN=DATA&_LFN=ALL&_TDS=IGNORE&FC=PageDown&JBC-COMPANY=71&_DELIM=%09&_OUT=XML&_EOT=TRUE

    AGS_PT_XMIT_NBR = 0

    AGS_PT_XMIT_NBR_2 = 0

    AGS_JBC_COMPANY = 71

    AGS_PRS_NAME = My Company Name

    [b]AGS_PT_JBC_JOB_CODE = 11040 (this should be 11090)[/b]

    AGS_LINE_FCr0 =

    [b]AGS_JBC_JOB_CODEr0 = 10050 (this should be 11040)[/b]

    AGS_JBC_SALARY_CLASSr0 =

    AGS_JBC_BEG_SAL_RANGEr0 =

    AGS_JBC_MID_SAL_RANGEr0 =

    AGS_JBC_END_SAL_RANGEr0 =

    AGS_JBC_CURRENCY_CODEr0 =

    AGS_JBC_EFFECT_DATEr0 =

    AGS_BASE_CURRENCY_TABr0 = Base Currency2

    AGS_CALC_WINDOWr0 = Calculation

    …..

    AGS_JBC_JOB_CODEr9 = 11035

    AGS_JBC_SALARY_CLASSr9 =

    AGS_JBC_BEG_SAL_RANGEr9 =

    AGS_JBC_MID_SAL_RANGEr9 =

    AGS_JBC_END_SAL_RANGEr9 =

    AGS_JBC_CURRENCY_CODEr9 =

    AGS_JBC_EFFECT_DATEr9 =

    AGS_BASE_CURRENCY_TABr9 = Base Currency2

    AGS_CALC_WINDOWr9 = Calculation

    AGS_JBC_BASE_BEG_SALr9 =

    AGS_JBC_BASE_MID_SALr9 =

    AGS_JBC_BASE_END_SALr9 =

    AGS_JBC_BASE_CURRENCYr9 =

    AGS_JBC_BASE_NDr9 = 0

    AGS_CHK_DECIMALSr9 = N

    AGS_JBC_CURR_NDr9 = 0

    AGS_JBC_PAY_RATEr9 = .0000

    AGS_JBC_MARKET_SALARYr9 = 0

    AGS__HK = 0071

    AGS_StatusNbr = 002

    AGS_RETURN_MSG = More Records Exist - Use PageDown

    AGS_RETURN_CODE = 0

    AGS_errorCode = 0

    AGS_informationCode = 0

    AGS_returnMessage = More Records Exist - Use PageDown

    AGS_outputData =

    Executing Branch Activity Branch9920.....

    Pushing Assign470 Activity in Execution Stack

    agsFC = PageDown

     

     

     


     

     
    David Williams
    Veteran Member
    Posts: 1127
    Veteran Member

      What you should be doing is using the Position To field with an Inquire. Pass the value from AGS_PT_JBC_JOB_CODE to the next Inquire you perform.

      Your AGS call would include: &FC=I&JBC-COMPANY=71&PT-JBC-JOB-CODE=10050 to get to the 2nd page
      and &FC=I&JBC-COMPANY=71&PT-JBC-JOB-CODE=11040 to get to the 3rd page and so forth

      Why aren't you using a DME call against the HR system table JOBCODE?

      David Williams
      kim
      Basic Member
      Posts: 15
      Basic Member
        Thanks David for the suggestion. Seems odd to me that I need to populate the PT since the Lawson form does that but I will give it a shot; again I am new to ProcessFlow so am learning the tricks of the trade.

        In regard to why I am doing an AGS to HR06 rather than an DME is that I wanted to give an example of how the pageDown was not working. I just grabbed a random Lawson detail form that I knew would have more than 3 pages. In reality I have a custom detail form that performs complex logic to return subsets of the employee population based on WF criteria.

        Thank you again for your prompt reply.
        David Williams
        Veteran Member
        Posts: 1127
        Veteran Member
          Kim,
          If you'd care to email me at David@ConsultDavidW.com then I'd be happy to send you my ProcessFlow Designer training guide (no cost).
          David Williams
          John Henley
          Posts: 3353
            Portal often populates the PT- fields behind the scenes to keep track of where the user is on a detail form. What you are doing with ProcessFlow is simulating how Portal would be doing it, which is 80% of the cases is via the key fields and the PT- fields.

            As for AGS vs DME, Using AGS can be a perfectly valid approach if you want data that is calculated and/or displayed on a form but not in the primary/related tables in a DME query.
            Thanks for using the LawsonGuru.com forums!
            John
            amitD
            New Member
            Posts: 1
            New Member

              i have a similar problem. I am using AGS call in a loop for the program to change some data in the AC13.1 form. The AGS query works fine when I pass the Position To field, but in this case an activity might have different set of attributes.

              All the activities in AC13.1 will have the attributes whose values that I am trying to load, but they will also have other attributes which might not be the same as every other activity. When I pass FC=PageDown it only goes to the 2nd page, and I can't seem to get to 3rd or 4th page. How can I go to these pages without using the position to field?

              Thanks a lot in advance

              David Williams
              Veteran Member
              Posts: 1127
              Veteran Member
                Look at the results of your AGS call Inquire - very often when multiple values are required for the next set of records there will be "next record" values which will become your "position to" values to get beyond the 2nd page.
                David Williams
                Gary Davies
                Veteran Member
                Posts: 248
                Veteran Member

                  Lawson forms that have detail lines have position to fields, they are not necessarily visible on the form.  If you use the AGS wizard in ProcessFlow it will show you the hidden fields as well.  As a general rule (there are exceptions) the position to fields start with PT- and there may be more than one.  if the key fields for the record it is read has more values than whats displayed then the rest of the key is probably hidden pt fields. 

                  Some times you actually have to look at the COBOL logic for the Page Down to see the exceptions.

                  Gary Davies

                  www.automated-workflow.com