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

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

Recommended Posts

Posted

Hi,

I am new to this forum, and could use some help with a script.

I have found this script on this forum and adjusted it.

The script is working almost fine, but i have a problem with the portal

rows.

Only the first row from the portal is copied and the others not.

The reason that i want to copy is that i don't want to type the data twice.

I have a screenprint from the script attached.

Thanks,

Frans

Script copy record with portal.doc

Posted

Hi,

I have solved the problem with the script see below, but now i have another question.

I try to perform the script from a layout (with a button) to copy the entries from the portal

to another portal in an external filemaker file.

The script works but i cannot open a new record in the external file.

I have tried it also with an "perform script" in the original script then he opens

a new record but i think that the variables are empty.

Has someone a clue how i can handle this

Thanks,

Frans

  • If [ Verkoopopdrachten::FactuurID ]
  • Set Variable [ $FactuurID; Value:Get(RecordNumber) ]
  • Show Custom Dialog [ Title: "Vrachtkosten aanmaken"; Message: "U gaat nu een kopie maken van deze Factuur om de vrachtkosten te declareren, wilt u dit"; Buttons: “Cancel”, “OK” ]
  • If [ Get (LastMessageChoice)=1 ]
  • Exit Script [ ]
  • End If
  • Go to Related Record [ From table: “Verkoopopdrachten”; Using layout: <Current Layout> ] [ Show only related records; Match found set ]
  • Duplicate Record/Request
  • Go to Record/Request/Page [ $FactuurID ] [ No dialog ]
  • Loop
  • Set Variable [ $productitemnummers; Value:Artikelen::Productitemnummer ]
  • Set Variable [ $Beschrijvings; Value:Artikelen::Beschrijving ]
  • Set Variable [ $Hoeveelheids; Value:Artikelen::Hoeveelheid ]
  • Set Variable [ $Valutas; Value:Artikelen::Valuta ]
  • Go to Record/Request/Page [ Last ]
  • Go to Layout [ “Formulierweergave” (Verkoopopdrachten) ]
  • Set Field [ Verkoopopdrachten::Formnaam; "Vrachtkosten" ]
  • Set Field [ Verkoopopdrachten::Verzendingsstatus; "Vrachtkosten" ]
  • Set Field [ Artikelen::Productitemnummer; $Productitemnummers ]
  • Set Field [ Artikelen::Beschrijving; $Beschrijvings ]
  • Set Field [ Artikelen::Hoeveelheid; $Hoeveelheids ]
  • Set Field [ Artikelen::Valuta; $Valutas ]
  • Go to Record/Request/Page [ $FactuurID ] [ No dialog ]
  • // Duplicate Record/Request
  • Go to Portal Row [ Select; Next; Exit after last ]
  • End Loop
  • Go to Record/Request/Page [ Last ]
  • Delete Portal Row [ No dialog ]
  • End If

This topic is 4694 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.