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

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

Recommended Posts

Posted

Is it possible to use a container field as a sort of single radio button?

What I mean by this is; I currently have calculated fields to show a 'star' rating - 0 to 5.

I use a drop-down for the initial number and this is then translated via a container (6 global) to show a graphic of corresponding 'stars'

What would be cool is to just click the container and let the 'stars' advance until you reach the desired 'rating' - any ideas?

Thanks in advance!

Frank.

Posted (edited)

Okay, i didn't catch a lot of how you're doing it at the moment, but I'd use three fields and one script to acheive this...

First Field, Repeating Global Container Field, 6 repetitions.

Rep 1 stores image for zero stars, Rep 2 stores image for one stars etc up to six.

Second Field, Rating -- Just a number field.

Third Field, Calculation, result container, calculation being: firstField[secondField]

Finally, the script that you can attach to your third field i.e. your container:

Set Field[ SecondField ;

Case( SecondField = 6 or IsEmpty( SecondField ) ; 1 ; secondField + 1 )

]

Commit Record/Request[]

Edited by Guest
Posted (edited)

Something like this?

EXACTLY like that! Many thanks!

Thanks also to Genx, although your solution (in print) went over my head a little...

Frank.

Edited by Guest
Posted

...Just one slight problem - my 'stars' start at zero and go through to 6 (not 1 - 5), this throws evertyhing out by 1, the zero seems to be invalid(!)

Frank.

Posted

Here's another way, you can then modify the calculated icon field to select different containers if you wish via the choose command.

Rod

Thanks!

This is (vitually) the same as my orginal set-up (Radio Buttons instead of hi-lite buttons though)

Frank.

Posted (edited)

Sorry did not read close enough, here's what I think your looking for.

Rod

Thanks Rod! Near-perfect - my first rating needs to be zero (5 stars blanked), using a zero in the calc doesn't seem to work though...

Maybe I need something like ?

Frank.

Edited by Guest
Posted

Have you thought about trying to modify one of the example files that were posted.

I just looked at the one comment posted, and it would be easy to modify it to 6 stars.

Change the value list by adding 6 to the list

Go into define fields and change the gStarsR to 6 Repetitions

Go into layout mode and click on gStarsR field and change it to 6 repetitions

Go into Browse mode and copy and paste 6 star into the last repetition.

HTH

Lee

Posted

I am not sure I understand the problem - do you mean you have a picture to go with rating 0?

If so, just change the definition of cStars to:

GetRepetition ( gStarsR ; Rating + 1 )

If not, please explain further.

Posted

The solution that Comment has posted should work for your needs. However, there was a thread on here a few years ago asking about a netflix type star images that I posted to. It probably is not the exact solution that you are looking for, but it might give you some ideas or clarify things for you.

Netflix Stars

This topic is 6549 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.