Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Using checkboxes to fill in separate fields


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

Recommended Posts

Posted

I am using checkboxes to select the names of various exercises from a

value list. From these selections I would like to copy the names of

exercises into separate fields(within the same record)B) excercise1,

exercise2, exercise3, ....exercise10.

Checkbox Field "Name of Exercise"

pronation(not checked)

flexion(checked)

extension(not checked)

abduction(checked)

internal rotation(checked)

Fields result in:

exercise1= flexion

exercise2= abduction

exercise3= internal rotation

exercise4= (waiting for next checked box)

I was wondering if anyone could help me figure out this calculation.

Thanks in advance!

Posted

Try to do like this:

exercise1=Case ( Position ( Name of Exercise;"flexion";1;1 )>0;"flexion")

exercise2=Case ( Position ( Name of Exercise;"pronation";1;1 )>0;"pronation")

exercise3=Case ( Position ( Name of Exercise;"internal rotation";1;1 )>0;"internal rotation")

Posted

You'll need as many exercise fields as there are exercises available in the list, just in case that's not obvious.

exercise1 = Substitute(LeftValues(Name of Exercise;1);/*Paragraph character*/;"")

exercise2 = Substitute(MiddleValues(Name of Exercise;2;1);/*Paragraph character*/;"")

exercise3 = Substitute(MiddleValues(Name of Exercise;3;1);/*Paragraph character*/;"")

exercise4 = Substitute(MiddleValues(Name of Exercise;4;1);/*Paragraph character*/;"")

...etc.

Posted

It would be much simpler to have your exercises as a related file. That is the power of relational. If you end up adding an Exercise, you will need to add a field (as you currently have it). AND ... you'll have to remember to add the new field to any of your calculations. Same if you decide to change the name of an exercise. And what happens if you wish to change the order of the exercises?

Pain in the _utt as the above responses are already showing you!! wink.gif

Posted

True. This is the difference between "What Works" and "What's Better."

What works is often simpler to implement now, and harder to fix later when it is no longer adequate. What's better is often much more complex, and harder to implement with the skills and time available.

When I provide an answer in the forums, I try to gauge where the query is coming from and whether "What Works" is really the desired response because "What's Better" is too complicated and answer accordingly.

Posted

What works is often simpler to implement now, and harder to fix later when it is no longer adequate. What's better is often much more complex, and harder to implement with the skills and time available.

Well, I've found that what is better is almost always easier to implement and that is (one reason) why it's better also.

My motto - when in doubt, split it out.

The best solution usually requires thinking through before implementing but once determined is much easier to put into place. I totally agree that, once a structure is up and running, changing it can be difficult.

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