Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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


This topic is 3679 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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...
Posted

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.

Posted

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

This topic is 3679 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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