Jump to content

Show Last Record in Portal


moj6054

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

Recommended Posts

I see last record (last line).

See it where, moj6054? In the first row of the portal? In related fields placed directly onto the layout? If you ask for the 'last' related value via script?

What determines whether the record is last? If you have a Creation Timestamp field and you want the last 'created' record then, as Bailey suggests, sort the relationship descending on Creation. Sorting the relationship will also sort the portal in that order unless you change the sort on the portal itself. So if you do not want to sort the relationship, you can still just sort the portal. :laugh2:

Link to comment
Share on other sites

If you always want to view the last record in a portal, you can create a script with:

Go To Portal Row [ last ]

Commit Records/Requests[ perform without dialog ]

... and attach it as a script trigger to the layout (Layouts > Layout Setup > Script triggers tab, as OnRecordLoad. You must also make sure that, in Portal setup, 'reset scroll bar' is unchecked. :^)

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

If you always want to view the last record in a portal, you can create a script with:

Go To Portal Row [ last ]

Commit Records/Requests[ perform without dialog ]

... and attach it as a script trigger to the layout (Layouts > Layout Setup > Script triggers tab, as OnRecordLoad. You must also make sure that, in Portal setup, 'reset scroll bar' is unchecked. :^)

 

Thank you - that is very useful.

 

I have a file that has multiple tabs and sub-tabs, many with portals.

The script trigger works for the main-tab but not the sub-tabs and

causes a disturbance when clicking through their registers.

Script triggering on the individual portals does not either. 

 

How can this to be worked?

 

TIA

Link to comment
Share on other sites

Sorry I was unclear ... Go To Object [] PINS you to a portal then next step Go to Field[ yourField] will always work. If you do not pin to a portal first, and you have multiple tabs, then it can break in a variety of ways. I could create simple demo showing how easily it breaks on you if you wish but the idea is to pin it first then do whatever is necessary in your script such as going to the last row or going to the field.

Link to comment
Share on other sites

Sorry about the time responding. I've been trying to figure out the 'Go to Field[yourField]'

It doesn't seem to work whatever way I put it in the script.

Only when I manually click inside the portal, does the register jump to the 'last row'.

Link to comment
Share on other sites

  • 2 months later...
  • Newbies

Dear All

 

I have a similar query appreciate if any expert guides me, since I am very new to File maker, the scenario is. I have two tables “HRMaster table” with Current Position and “wages table” with position

both of them are linked with relationship using primer key and working fine

 

In the browsmode I have added HRMaster as main and wages as a portal. If I enter a new position in wages “position” it should change current position of HRmaster. If not it should retain its current position of HRMaster

 

Appreciate your help

 

Regards

Zain

Link to comment
Share on other sites

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