Jump to content

Not sure how Status(current portal row) works...


JMX
 Share

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

Recommended Posts

  • 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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...
  • 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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...

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.

Link to comment
Share on other sites

This topic is 6422 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.