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.

Finding next value in table

Featured Replies

How can I find next value in table.

By example;

Table:

Letter Extratext

A GO

A GOA

B ABD

C DE

D E

D FE

E FGE

I wan't to filter on the Letter Field by button.

Want to have to buttons, next en previous. By clicking need to have the unique value.

How can I fix this ?

There are two separate questions here:

1. How to make the buttons go to a record in the previous/next group (which record in the group, BTW)?

2. How to show the Letter value of the previous/next group of records. I assume your records are sorted by the Letter field, and that the question relates to the current found set only?

  • Author

How to make the buttons is known by me, actually is my questions, how can I find the next unique value in the field LETTER ?

I wan't to do this by clicking on a button, but first I think I do need an script ?

How to make the buttons is known by me

That's good, because I am not sure it's known to me... So, if you know the number of the record to go to, you can use the GetNthRecord() function to read the value from that record.

  • Author

Okay, the number of the record I don't know. Because this field gets every day new data.

I wan't to see the next unique value in the field LETTER by clicking the button.

Any suggestions ?

Okay, the number of the record I don't know.

How then do you make the buttons work?

In any case, I can't answer either one of your questions without knowing if this needs to happen within the current found set, or taking into account all records in the table.

Try this script:

Set Variable[$letter; Value: Letter]

Loop

Go to Record/Request/Page[Next;exit after last]

Exit Loop if [$letter ≠ Letter]

End Loop

Ouch. Surely, the record to go to could be computed?

  • Author

Thanks Doughemi, this was the script I was looking for.

Apology if I wasn't clear about my request.

I make two buttons and run this script, one for next value and one for previous value.

Thanks.

Simply substitute Go To Record/Request/Page[Previous; exit after last] in the script for the Previous button.

  • Author

I need to know how to print after finding each value.

So by exampe I found an unique value then I want to print, go further to next value and then print again, go further to next value and then print again, after printing every unique value it has to stop.

How can I organise that one ? The script of Doughemi is working, I suppose I have to add somewhere a print job ?

Do you need to print a report, with all the values on one page, or a page for each found value? Do you need to print other fields in the found records, or just the found value? A little more information about the business purpose here (with actual data examples, not A, B, C) would be helpful.

  • Author

Anwser on question 1) A page for each found value

Anwser on question 2) The other fields also needed

I suppose I have to put somewhere in the script the printing job. So what my request is that after finding a unique value there has to be a printing, direct the system has to find next unique value and print this one also, following direct to find the next unique value and print this also, untill all unique value's has been found and printed. Is that possible ?

It is for an logistic company, the LETTER field is the TRIP number and the following fields will be the STOP where the driver had to unload, etc.

I believe you are making this much more complicated than it needs to be, instead of taking advantage of Filemaker's built-in features. Why don't you simply print a report of Stops, sorted and sub-summarized by Trip? Similarly, your previous question could be solved simply by browsing the Trips table, with the related Stops being shown in a portal.

Does each stop belong to one trip only, or are there stops that are used by several trips?

  • Author

Okay how does it works the sub-summarized function ?

Is it not easy to put the print job in above script ?

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.