Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

If it is driven off the buttons on the portal row then FM knows what portal row it is.

Otherwise you can use something like Last() across the relationship.  But be careful about using constructs like that in calculated fields.  They tend to become performance hogs as the data grows.

Posted

this is the code in this layout that will add new data when I click Add Bill.

Set Variable [$CustomerID;Value Transaction::CustomersID]
Go to Layout["Add_Billing"(Transaction);]
New Record/Request
Set Field[Transaction::CustomersId;$CustomerID]
Go to Field[Transaction::Month]

add bill.jpg

Posted

"it didn't work" doesn't tell us much so you have to be a lot more explicit about what you tried and what the result is and what you expected.  Otherwise we're just guessing.

Provided that the relationship for the portal is just driven off the single "customerID" predicate then your script will properly create a new related record that will show in the portal.  Can you confirm that this part is working?

If you want the field "PRV RDG" to be be filled on that new record, with the value from the last related record then you have to capture that value at the start of the script and then set it in the proper field after creating the new record.

Posted

yes that what i really meant, I'm trying to set the "PRV RDG" from the last row of the portal from PRS RDG.before creating/add new record.how can i do that and where i could put the script in?

Posted

Looks like we're having the same conversation in two different threads.

Your line #1 doesn't capture the PRV value from the last related record, it captures the value from the first related value (assuming that the layout is based on the "wb" table occurrence).

Change that first line to use Last( Transaction::PRV )

  • Like 1

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