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.

How to go to a random record from one table to another - Need Help

Featured Replies

Hello

I have a file included here that has 2 layouts

Consolidate records  and Actual records

 

I would like to make a button to randomize the records which are questions in 

the consolidate records layout. BUT i would like to use the WEIGHTED randomization from 

the second layout  in the background called Actual records.

 

If you try my example file you will see there are only 5 records and 5 questions in the consolidate records layout.

 

By pressing the button background you will go to the layout Actual records.

 

I f you keep pressing the random button you will  easily see the randomization is of the number of records but it reflects the number of times I duplicated each question number. ( in the case of question 5 it was 14 times) In other words I have customized the frequency of each question coming up by adding additional records assigned to that          question.

 

SO

I would like to make a script in the consolidate records table that will

Make the user go to the question number from the result in the other layout (after pressing the random button) that is in the question number field. 

 

I don’t know how to do this and I would like to have help to make this happen. I have been working on this for days. It might be some kind of portal but I don’t know how to make that happen.

 

If you can help I would deeply appreciate this. It would really make my day.

Thanks

consolidate records test.fmp12.zip

  • Author

I thank you for the info.  I somehow had the assumption that I can use a portal to show a field from another table and to use it in a calculation. 

That is what I was trying to find out. 

In this case just go to the record of the see thru field..

 

 

Also the reason my font was bigger is because I was writing my post in word. Because a few times when I use safari to post -- I painstakingly get the whole thing written and then somehow the page changes to one of those awful pop up web pages that warns you you have to call a number immediately to save your data and it ruins my post. When I paste it into this web site is was bigger. Sorry about that. 

I somehow had the assumption that I can use a portal to show a field from another table and to use it in a calculation. 

That is what I was trying to find out. 

In this case just go to the record of the see thru field..

 

I am not sure I understand your question. You can use a portal to show multiple related records from another table. To go to any one of these records, place a button in the portal and define it to Go to Related Record[]. See the help for explanation of the various options this script step has. But this has nothing to do with weighted randomization.

  • Author

How do i script going to a  specific record number . I have a field with the record number i want to go to in it.

The record number is meaning less, you need to know what the primary key is of the record you want go to (or anything else that is guaranteed to be unique) so you can search on it.

Or build a temp relationship and use GoToRelated

 

If the target record is already displayed in a portal then you can just use the GoToRelated script step.

  • Author

I don't get what you are saying. Can you modify my example to show me?

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.