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.

Entering field content of found set in corresponding field on different layout

Featured Replies

Hi there, can somebody help please,

 

I have two layouts Console & Weekend plan, i created found set on console layout for records whose start date field match a defined date range, returning found set of 37 records, now i would like to match another field on console layout named "Vehicle" to a field on weekend plan layout named Reg.No, if the match then script should add to weekend plan layout TourNr field information from console layout TourNrID field.

 

As at now, i can find the records matching the date range and can not go on from there......i need help for this script to work please and i thai you in advance.

 

 

 

  • 2 weeks later...

Hi Miss A

I'm not sure if I understand you correctly but if you have a related related record you can just use the related field directly in the original layout - or use use set field in the script to actually make a new entry (not especially recommended). That said maybe you are having problems because you relationship isn't working correctly.

  • Author

Thanx John - I managed by use of script, because it had to be automated through button, see script below it is working but if you like, please evaluate it, let me know hat i should have used and what not if there is way to better it :) m just learning.

 

 

Go to Layout [ “Service Plan” (Service Plan) ]
Perform Script [ “Clear SP” ]
Set Error Capture [ On ]
Go to Layout [ “Remittance_Ordinary” (Remittance_Transport) ] Enter Find Mode [ ]
Set Field [ Remittance_Transport::Ledger Accounts; "1010 Service" ] Set Field [ Remittance_Transport::flt__VehicleStatus; "A" ]
Set Field [ Remittance_Transport::KM_Reading; "*" ]
Set Field [ Remittance_Transport::Reference:; "==###*" ]
Perform Find [ ]
// If[Get(LastError)]
// Go to Layout [ original layout ]
// Show Custom Dialog [ Title: "No records found"; Default Button: “OK”, Commit: “Yes” ] // End If
Sort Records [ Keep records in sorted order; Specified Sort Order: Remittance_Transport::__ID_Vehicle_Transport; ascending Remittance_Transport::Date_Of_Action; descending ]
[ Restore; No dialog ]
Go to Record/Request/Page
[ First ] Loop
#Set Vehicle plate number to match Vehcile_RegNr in Service Plan
Set Variable [ $VHR; Value:MiddleWords(Remittance_Transport::Vehicle;2;1) ]
Set Variable [ $Veh_Count; Value:GetSummary ( Remittance_Transport::lxt_Vehicle_Summary ; Remittance_Transport::__ID_Vehicle_Transport ) ]
#
Set Variable [ $NextStart; Value:Get ( RecordNumber ) + $Veh_Count ]
Set Variable [ $ADate; Value:Remittance_Transport::Date_Of_Action ]
Set Variable [ $KMReading; Value:Remittance_Transport::KM_Reading ]
Go to Layout [ “Service Plan” (Service Plan) ]
Perform Find [ Specified Find Requests: Find Records; Criteria: Service Plan::lxt_VehicleRegNr: “$VHR” ] [ Restore ]
Set Field [ Service Plan::lxd_Last_ServiceDate; $ADAte ]
Set Field [ Service Plan::lxn_KMReading; $KMReading ]
Go to Layout [ “Remittance_Ordinary” (Remittance_Transport) ]
Go to Record/Request/Page [ $NextStart ] [ No dialog ]
Exit Loop If [ $NextStart > Get ( FoundCount ) ] End Loop
Go to Layout [ “Service Plan” (Service Plan) ] 21 October 2014 11:43:10
Show all records

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.