Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Display last related record on portal row

Featured Replies

I searched the forum and couldn’t seem to find this, but I am sure that this has been requested by others.

I have a portal and want to show the last related record in the portal. I have People > Jobs (one person to many jobs ) and Jobs> Contracts (one job to many contracts). I have a job portal on a People layout and I would like to display the last contract written off that job. <>

I was writing a script and this is what I have so far… but it’s not updating the job_display field

GTTR

Go to Record/Request/Page ([Last])

Set field [Job::c_display_last_contract;Contract::cn_apptperiod]

Go to Layout [“People” (People)]

Go to field [Job::jobtab]

I could see this as a common request… but couldn’t find any topics to address this. If you could help or point me to another topic, I would greatly appreciate it.

Thanks in advance.

Assuming you have a JobDate or creation Date on each record why can't you sort the portal on date in descending order?

In layout mode double click on the portal and Check sort portal records. Then click on Specify sort and set up your sort order by Job Date descending.

You could also add a sort command to your script and do the same.

Of course the same would hold true if you use a JobID or any date/number type field.

HTH

Edited by Guest

  • Author

I do have a job creation date & primay keys... but I am looking for the last Contract written (another table) to be posted in the job portal.

So I have jobs in a portal (sorted by their dept and then creation date) Contracts are written off jobs and I would like to display on the job portal, the last related record in the contract table.

Does that make sense?

Do you mean you only want the last contract to show?

If yes, then why the portal? Portals are usually to display multiple records, but then, never say never.

If that's the case you could still sort in descending order and just have a one line portal.

Otherwise, I think you would need to set up a filter in your TO, but, I'm not the greatest with that. Try a search on filtering portals and you may find the answer.

  • Author

I have multiple jobs in a portal.... and for each job there can be contract(s) written.... For job ABC, there could be a fall contract, a summer contract and next summer contract. On the Job ABC portal row- I want the Summer 2007 contract to display to show the last contract written against that job.

I have made a very very simple database.... to show what the goal is.

Any assistance will be greatly appreciated.

I can see this as a common request (no??)... for instance, invoice and multi payment solution. I might not be explaining myself correctly. <?>

Thanks in advance

lastcontractdisplayed.zip

Use the Last() function?

  • Author

Comment-

Works perfectly---- made a calculated field with the Last() function and no need for a script to update it!!!

Thanks bunches

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.