Skip 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.

Count portal records? If #2 doesn't exist...

Featured Replies

I'm a newbie and I'm stuck AND feeling quite stupid.

I have a script that goes to a portal (of self-related records) on a layout, directly to Record#2. (Go to Portal Row [select; No dialog; 2]). The script then continues to loop through portal records and perform additional tasks. However, if record #2 doesn't exist (that is, there is only one related record), I want to abort the whole thing and generate an alert message. (If Record#2 doesn't exist, it indicates another problem that needs investigation.)

I thought I could just trap for an error, but it doesn't appear to generate an error if there is no second record. It just continues on, even though it hasn't been able to go to Portal Record 2. It apparently becomes caught in a loop as it continually retests a record that doesn't exist.

Questions: Is there any way to count the number of records in a portal? And/Or is there any other way to have it identify that there is no second record?

There's probably a really obvious answer out there...

Will be happy to provide more detail about this particular script, if needed!

Questions: Is there any way to count the number of records in a portal?

Try the Count() function.

  • Author

I looked at Count... but it seems to count the number of values in a field? Is there a way to make it count records in a portal?

  • Author

Hold it. I think I just got it. Lemme try Count, if I think I understand...!

A light bulb moment. ;-) Count the number of foreign keys.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.