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.

Renumber Portal Records

Featured Replies

I would like to select and delete a record from the middle of a portal and then renumber the remaining portal records #'s sequentially, from 1-12. Do I need to use a loop script and end when the script reaches the bottom (end) of the portal?

Thanks,

Jason

Do I need to use a loop script and end when the script reaches the bottom (end) of the portal

Hi Jason,

That would certainly be an option.

However I wonder if you really need to store a portal row number as data in the first place?? If you just need it for display purposes, you can create a dynamic row number by using the @@ symbol in a text object within the portal row? The resulting numbers will automatically adjust to accurately show row numbers in the portal.

You may well have your reasons, but if not, it seems like the @@ trick would be a good deal simpler/easier. :)

  • Author

Hi CobaltSky,

Thanks for your response. I need to include the row number because, as a separate issue, I want to allow the user to adjust the sort order in a random fashion. This solution is exam generator. Question 5 follows 4, ... etc. The questions are listed in a portal. In addition to being able to delete a question, the author may want to put one question before another.

So my row number is my question number. The author may delete a question, in which case the question numbers need to dynamically adjust, or the author may change the order of questions, in which case it would be nice to have the question numbers dynamically adjust as well.

Now that I think of it, this is kind of like a bibliography program (eg, Endnote) where if you delete or move a reference, the remaining references dynamically renumber.

I did not understand the @@trick. I created a field and put in my portal and placed the symbols "@@" in it. Is this what you meant?

Thanks,

Jason

...I need to include the row number because, as a separate issue, I want to allow the user to adjust the sort order in a random fashion.

Okay, that being the case, a looping script that renumbers the rows may be the most appropriate.

You may also wish to use a looping script to re-assign question numbers when changing the question order.

I did not understand the @@trick. I created a field and put in my portal and placed the symbols "@@" in it. Is this what you meant?

Yes, that's what I meant. If you insert the two @ symbols into a text object in layout mode, when you view the layout in Browse mode, the @@ will be replaced with the current record number.

If you place the @@ into a portal row, in Browse mode, it will appear as the corresponding portal row number. :wink2:

  • Author

I set up the loop (my first) and it worked great. I don't understand what a text object is. I defined a text field and put it in the portal and then put "@@" in it in browse mode but it didn't work.

I set up the loop (my first) and it worked great. I don't understand what a text object is...

A text object is created in layout mode by selecting the text tool from the Status Area (it's the one that has the capital A symbol on it) then clicking on the layout where you want to place the object and typing some text.

Once you create a text object in this way and enter @@ into it, then go back to browse mode, you'll see what I was referring to. :wink2:

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.