Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Go to next portal row failing me

Featured Replies

Hi All,

I am trying to create a series of records in a related table from a portal but my Loop is failing at the "Go To Next Portal Row" script step as it returns to the layout and selects the first portal row. Could you advise on where the script is failing please.

 

Script:

 

Go to Field [ Job_Card::Job_No ] [ Select/perform ]


Enter Find Mode [ ] [ Pause ]


#Allows the user to select the Job Card then finds the Active Items in the Installation_Items and sorts them


Perform Find [ ] Copy [ Job_Card::Inst_No ]


[ Select ]


Go to Layout [ “Installation_Items” (Installation_Items) ]


Enter Find Mode [ ]


Paste [ Installation_Items::Inst_No ] [ Select ]


Perform Find [ ] Constrain Found Set [ Specified Find Requests: Find Records; Criteria: Installation_Items::Active_Flag: “=1” ]


[ Restore ]


Sort Records [ Specified Sort Order: Installation_Items::Product_ID; ascending ] [ Restore; No dialog ]


Go to Layout [ “Job_Card” (Job_Card) ]


#Sets the Variables to take the data to the Service Line Items


Set Variable [ $Job_No; Value:Job_Card::Job_No ]


Set Variable [ $Inst_No; Value:Job_Card::Inst_No ]


Set Variable [ $Svc_Date; Value:Job_Card::Svc_Date ]


Set Variable [ $ID; Value:Installation_Items::ID ]


Set Variable [ $Product_ID; Value:Installation_Items::Product_ID ]


Set Variable [ $Product; Value:Installation_Items::Product ]


Set Variable [ $Svc_Qty; Value:Installation_Items::Svc_Qty ]


Go to Portal Row [ Select; First ]

 

Go to Layout [ “Service_Items” (Service_Items) ] #Create the first record from the Job Card Items portal Loop


New Record/Request Set Field [ Service_Items::Inst_No; $Inst_No ]


Set Field [ Service_Items::Job_No; $Job_No ]


Set Field [ Service_Items::Date; $Svc_Date ]


Set Field [ Service_Items::ID; $ID ]


Set Field [ Service_Items::Product_ID; $Product_ID ]


Set Field [ Service_Items::Product; $Product ]


Set Field [ Service_Items::Svc_Qty; $Svc_Qty ]


Enter Find Mode [ ] Set Field [ Service_Items::Job_No; $Job_No ]


Set Field [ Service_Items::Product_ID; $Product_ID ]


Perform Find [ ] Loop


#Creates additional records to match the Service Items Quantity


Exit Loop If [ Get ( FoundCount ) = Service_Items::Svc_Qty ]

 

New Record/Request

 

Set Field [ Service_Items::Inst_No; $Inst_No ]


Set Field [ Service_Items::Job_No; $Job_No ]


Set Field [ Service_Items::Date; $Svc_Date ]


Set Field [ Service_Items::ID; $ID ]


Set Field [ Service_Items::Product_ID; $Product_ID ]


Set Field [ Service_Items::Product; $Product ]


Set Field [ Service_Items::Svc_Qty; $Svc_Qty ]


Enter Find Mode [ ]

 

Set Field [ Service_Items::Job_No; $Job_No ]


Set Field [ Service_Items::Product_ID; $Product_ID ]


Perform Find [ ]

 

 

End Loop


#Pauses the script to allow the Service Items to be entered


Pause/Resume Script [ Indefinitely ]


Go to Layout [ “Job_Card” (Job_Card) ]


Go to Portal Row


[ Select; Next; Exit after last ]


End Loop

Solved by Oyseka

Go to solution
  • Author
  • Solution

Sorry, figured it out (RTFM).

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.