dimension Posted February 18, 2007 Posted February 18, 2007 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.
Genx Posted February 18, 2007 Posted February 18, 2007 (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 February 18, 2007 by Guest
dimension Posted February 18, 2007 Author Posted February 18, 2007 (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 February 18, 2007 by Guest
dimension Posted February 18, 2007 Author Posted February 18, 2007 ...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.
RodSierra Posted February 18, 2007 Posted February 18, 2007 Here's another way, you can then modify the calculated icon field to select different containers if you wish via the choose command. Rod RatingCalc.fp7.zip
dimension Posted February 18, 2007 Author Posted February 18, 2007 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.
RodSierra Posted February 18, 2007 Posted February 18, 2007 Sorry did not read close enough, here's what I think your looking for. Rod RatingCalc_2.fp7.zip
dimension Posted February 18, 2007 Author Posted February 18, 2007 (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 February 18, 2007 by Guest
Lee Smith Posted February 18, 2007 Posted February 18, 2007 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
dimension Posted February 18, 2007 Author Posted February 18, 2007 ...I already tried all that; selecting zero gives a blank, selecting 1 gives 2 stars and so on. Where am I going wrong? Frank.
comment Posted February 18, 2007 Posted February 18, 2007 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.
mr_vodka Posted February 18, 2007 Posted February 18, 2007 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now