mount Posted April 4, 2004 Posted April 4, 2004 This is my first FM and contains the in/out post between my office and others in diferent cities. I made one file (register) and two related files (in and out): each record with the fields (from, to, date, reference, issue, reference out). In the register file I made two layouts (in and out), each one with a portal that shows and filters the records. I would like to automatize one thing. When I create a new record in the out portal, and I type de "reference" field, I'd like FM to find this record in the "in" portal, type the reference in the "reference out" field and get the "issue" field value and type it back in the "issue" field in the "out" portal. I don't know if it's clear. Sorry for my english. I made a Script that runs from the "out" file, but when I try to run it from the portal (I made a button) it doesn't work. I think that it tries to run taking the value of the first row in the portal. This is the script: SetField ["gRefOut","AllOut::Reference"] SetField ["gRefOut IssIn",""BCN" & AllOut::Reference & "/" & AllOut::Year"] RunScript [subscript, in.FP3] If ["gRefOut IssIn<>"""] SetField ["AllOut::Issue","gRefOut IssIn"] EndIf The in.FP3 Script is a Loop that looks for the related record, sets the "Reference out" field, and gets the "issue" field.
mount Posted April 5, 2004 Author Posted April 5, 2004 I just fixed it from an other topic in this forum: I needed a gPortalRow= Status(CurrentPortalRow) in the first line of the script. Another question. Is it possible to run this script automatically when the "reference" field is just filled?. Now I do it by a button.
Recommended Posts
This topic is 7538 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 accountSign in
Already have an account? Sign in here.
Sign In Now