February 17, 20205 yr how to get last record/field from a portal and used or copy that data in to other layout? for more clearer view!
February 17, 20205 yr 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.
February 18, 20205 yr Author tried it from the other layout and its the way what i wanted to..but when i tried on this layout it didn't work.
February 18, 20205 yr Author 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]
February 18, 20205 yr "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.
February 19, 20205 yr Author 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?
February 19, 20205 yr Author this is what i came up with, but when i tried it ,it only shows the "PRV" when i start to input data in a field,
February 19, 20205 yr 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 )
February 22, 20205 yr Author Thanks for the response sir,i'll try this right away when i got back to office.
February 26, 20205 yr Author thanks sir @Wim Decorte this is what i looking for, it solved my problem. thanks again sir.
Create an account or sign in to comment