March 26, 200421 yr Newbies I have 2 files. File A and B. File A has a portal row with related fields in fields B. I'm trying to set it up so that I can go from a field in a record in file B and want to go to that portal row in file A. I use a script button in the portal row to get from file A to File B where something happens and i'm trying to get back to the same spot where I executed the script (same portal row). I'm able to get back to the correct record in file A but want to be dropped off in the portal row field that I clicked on to execute the original script. I have not been able to get the status(current portal row)to work. I was trying to use a field as pointer where the current row# would be stored so that when I came back to File B could help me get back to the correct portal row. Version: v6.x Platform: Windows 2000
March 26, 200421 yr Hi - You will need a global number field (gPortalRow) in file A Then, in your script you add the line Set Field [gPortalRow, " Status(CurrentPortalRow) "] Add this before you perform your external script. When coming back to File A you will need the following Go To Field [ Your Portal Relationship::Filed x ] where field x is a field that exists in that portal Go To Portal Row [by field value, gPortalRow] You have to target the portal first before you can go to a row in it. This is especially important if you have multiple portals on a single layout. HTH
April 3, 200421 yr Author Newbies This makes sense but I am unable to get the "set Field..." part to work. I pause my script after that step and see that it has 0.00 in the global field. I had the cursor in the portal row that I wanted.
April 4, 200421 yr Setting gPortalRow must be the very first step in your script that's executed by your portal button, because as soon as the focus leaves the portal, the current portal row becomes undefined. Also, make sure that you haven't inadvertently defined your global field gPortalRow as a regular number field. I do it all the time.
June 24, 200421 yr I'm having a similar problem. I want to create a script that will duplicate a particular portal row. Before doing that however, as a test I created a calculation field in the parent file in which the calculation is simply "Status (CurrentPortalRow)", and the calculation is unstored. I put the field on the layout with the portal (the only portal on the layout), and tried selecting various rows in the portal, both by highlighting the entire portal row, and by placing the cursor into one of the editable fields in the row. No matter what I do, the CurrentPortalRow calc field always displays "0". That is, it doesn't seem to know that I am in a portal row. Both the portal and the calc field are in the body of a layout that is displayed in form view.
June 24, 200421 yr I don't think Status(CurrentPortalRow) works as a calculation field in FM 6 and below, only in a scripted calculation.
June 24, 200421 yr Queue is right, Status(CurrentPortalRow) doesn't work as a calculation field on its own. You should use a script with SetField("SomeGlobalField", "Status(CurrentPortalRow)"), as Andy and Bob explained above.
Create an account or sign in to comment