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.

Getting number of selected record w/o script!?

Featured Replies

I know how to get the number of the currently selected record using a script. The question is, if there's also a way to figure out the number of the SELECTED record with just a calculation and NO script.

None of the Status(CurrentRecord...) functions provides this info as it seems. However if you take a look at the image below, you might understand why I'm asking.

62918-listproblem.gif

Or does anybody know either how to prevent the empty space below the list from being clicked or how to make the empty space act like a button, so that it stills can trigger a script?

listproblem.gif

Hi,

Is there any chance you could jump from the list view to a selfjoin portal in a Browse view....?

  • Author

I really have to think hard... I can exactly recall why I've chosen list view over selfjoin portal and Browse Mode, but I'm pretty sure there was a reason. I'll give it a try, although this will probabely mean changes to most of the related scripts...

Ref...

"if there's also a way to figure out the number of the SELECTED record with just a calculation and NO script."

You could use an unstored calculation which = Status(CurrentRecordNumber) - if you're going to do anything with the result.

But, if you just want to display it, just type @@ on the layout and this will display the current record number when in Browse Mode.

I'd bet long odds that RussBaker has hit the nail on the head -- make sure your calculation is unstored.

  • Author

Dilucaugo68,

it seems my brain is stuck. I can't figure out how to show all records as item of the self-join portal in each record. I need all to all, not all to one or some to one and others to another. Can you give me a hint?

Hi,

Well, you'll need a constant relationship using both a global field (numbr =1) for left side and an indexed calc (=1) for the right side.

Reading at Russ's answer, there might be a solution for the Status(CurrentRecordNumber). As a firts reading, I thought you were trying to show the current Id (you Id, Inv025,...).

But I generally really like selfjoin portals (even those fixed ones) and almost try to get rid of list mode views.

Dan,

I'm quite sure that's one reason he still have his 5 stars, grin.gif.

Where have yours gone ? wink.gif

  • Author

Unstored calculation doesn't seem to work:

62940-unstoredproblem.gif

@@ is nice, but IMO there's no way that FMP can read this info.

unstoredproblem.gif

Ahh...

You want it to fill any line and want to display both fields :

- Record_Id

- Selected Record_Id...

Well, I see no other option than to use a script and a global field for that....even with a selfjoin portal.

  • Author

The solution with the self-join has the advantange that's its impossible to click anything else than a record in one of the portal rows. So this would solve my "empty space below the list" problem, which is why the use of a script would be OK again.

However, the two big disadvantages as I have figured out are that,

a) no matter how many "Freeze Windows" script steps I use the Window flashes/visible redraws and

: I can goto to a specfic portal row, but the focus gets lost as soon as I click outside the portal (in case the number of records is higher than the number of visible portal rows).

Hi,

: That is why I said

But I generally really like selfjoin portals (even those fixed ones) and almost try to get rid of list mode views.

"The fixed ones"...have a look here for "fixed portal texhnique"

Pupiweb's web site

"... how to make the empty space act like a button, so that it stills can trigger a script..."

Easier than you think... assuming that the blank row at the bottom allows the creation of new records and isn't just a blank related record.

For the blank row at the bottom, the related remote key is empty. Always. All you need to do is make a script that checks for this...

If [isEmpty(relationship::remotekey)]

   <stuff for the blank row>

Else

   <stuff for a related record>

End If

  • Author

"Easier than you think... assuming that the blank row at the bottom allows the creation of new records and isn't just a blank related record."

Vaughan,

could it be that you are talking about a portal while I'm talking about list view?

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.