AnsweredAssumed Answered

Add records through portal with the Header changing it's values

Question asked by DranLang on Jul 24, 2013
Latest reply on Jul 24, 2013 by philmodjunk

Title

Add records through portal with the Header changing it's values

Post

     Hi everyone! It's been more than 2 months now I'm using FM Pro and now I'm currently doing portals but I've got a situation where I have a header and body (layout parts) and my portal connected to a different table.

     My header consists of values from my TABLE1 and TABLE2, where my TABLE 2 is my current table as per the layout I'm using.  The values from both tables are linked by JobID.  Then I have a button which will run a script when clicked.  The script is written as follows:

     Go to Layout ["LAYOUT NAME" ( TABLE NAME)]

     Set Variable [$$Job_ID; <VALUE>]

     Set Variable [$$Job_No; <VALUE>]

     New Record/Request

     Set Field [<TABLE NAME::JobID; $$Job_ID]

     Set Field [<TABLE NAME::JobNum; $$Job_No + 1]

     In my current layout, I have a portal that adds records to the TABLE 2.  But when I click the NEXT JOB button, the other fields that are not in the layout will clear out and I can add new entries but for the fields in the portal, they stay and if I change something they will be reflected in the previous record.

     Is there something missing or I need to change in my script? 

     All suggestions will really be appreciated.

      

     Cheers

Outcomes