Jump to content

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

Recommended Posts

  • Newbies
Posted

I have been all over the books and the forum site, but can't find an answer to this qusiton: Is it possible to use a container field in a calculation?

I have a file of mini courses. The faculty will be able to designate a difficulty level from 1 to 4. I have a star graphic known as DesStarGraphic1. I would like to produce a caculation so if the difficutly level is one, only one star graphic shows up, if it is 2, 2 graphics show up, etc. I have written a nested If statement that produces correct results for 1, the caculation falls apart on difficulty 2 (meaning, nothing shows up). I am using this code in the calculation (called DesLevelCal):

If (DesLevel="1", DesStarGraphic1,

If DesLevel="2", DesStarGraphic1&DesStarGraphic1,

If DesLevel="3", DesStartGraphic&DesStarGraphic1&DesStarGraphic1,

DesStarGraphic1&DesStarGraphic1&DesStarGraphic1&DesStarGraphic1)))

It may be as simple as not being able to do this (that is add up the graphic fields) though it seems like it should be possible. I make the target field (DesLevelCal) a repeating container, still no dice. Any ideas?

I am posting this Thursday, but won't be back to answer until Monday. Have a great spooky weekend. I will be haunted by my problem. grin.gif

Posted

You can't put two graphics into one container field. What you can do is this:

Make DesStarGraphic1 a repeating field. Put 1 star into rep 1, 2 stars into rep 2, etc.

Choose (DesLevel, "",

GetRepetition(DesStarGraphic1, 1),

GetRepetition(DesStarGraphic1, 2),

GetRepetition(DesStarGraphic1, 3),

GetRepetition(DesStarGraphic1, 4) )

Posted

Additional clarification:

The repeating field (DesStarGraphic1) should be a global container field. Place the field on a developer layout with all the repetitions showing and the paste your star graphics into the individual repetitions (one star in rep 1, two stars in rep 2, etc.). This will require you to create a graphics for each repetition.

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