Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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


This topic is 3772 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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. 

Posted

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.

Posted

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.

This topic is 3772 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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