November 18, 201411 yr By this I mean If I had a sentence. " I love the color .........." The relationship word is color but the possible answers might be red, blue, green , yellow orange white , maroon. Can this be done somehow? The lookup may have a random answer within a list... Not sure what call this.
November 18, 201411 yr I'm not absolutely sure what you're trying to do. I think you want to select a random record from another table. If that's the case, here's how I would probably do it. I'm going to work with a Sentences table and a Colors table. Create a cartesian product relationship between the two tables. This relates all of the records in one table to all of the records in the other table. Normally you create a equals relationship where the match fields must equal each other and the symbol in the popup menu between the match field selection lists is an equal sign. For a cartesian product relationship the match fields don't really matter and you select the "x" symbol in the popup menu. See http://help.filemaker.com/app/answers/detail/a_id/5463/~/using-the-cartesian-product-relationship-in-filemaker-profor more information about it. Now that you have the cartesian product relationship, you can create a calculation that will, from Sentences, choose a random record's field's contents in Colors: Let( [ _count = Count(Colors::id); _random = Int( Random * _count ) + 1 ]; GetNthRecord( Colors::color; _random ) ) Check out http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/for a nice custom function that'll do a better job at generating random numbers. Thanks, Chuck
November 19, 201411 yr Check out http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/for a nice custom function that'll do a better job at generating random numbers. FYI, FMI have fixed the Random function so that in can no longer return 1. That was waaaaaay back in v10.0v3.
November 19, 201411 yr FYI, FMI have fixed the Random function so that in can no longer return 1. That was waaaaaay back in v10.0v3. Thanks for the information. I was unaware of that.
November 29, 201411 yr Author I don't quite get it. I made a file with a drop down box and a relationship to see if there is a way to do this with random birds of the same name. If you try to place a bird name you will always get the same lookup. I am trying to get a random of the same bird, as in the example i am uploading Can someone help me get this right with this file. Thanks Birds for FMFORUM RANDOM.fmp12.zip
November 29, 201411 yr See if this helps. A technique for creating the conditional bird serial numbers can be found here. Birds for FMFORUM RANDOM_doughemiMod.fmp12.zip
Create an account or sign in to comment