1 button incerment 2 Text Entry fields?

Discussion of the version of HanDBase that runs on the iPhone and iPod touch devices. This includes the synchronization conduits as well.

1 button incerment 2 Text Entry fields?

Postby glenwf » Wed Dec 11, 2013 2:24 pm

I'm working in a form and I don't see how one button can increment 2 Text Edit numerical fields since a button is associated with only one data filed.

Is this possible? I want to have 1 button incerment 2 Text Entry fields? The Entry fields are integer numbers and increment at the same time, but are not the same initial number and one field must start over occasionally (manual editing) while the other entry field continues to increment.

Is that clear? I now have a button associated with each Text Edit fields and increment each separately and sometimes forget to increment one of them, hence the desire to have one button increment both at the same time.

I've had fun playing around with different ideas using multiple fields, but don't see how I can get this to work.
PS
iPod Touch 5, HanDBase ver 4.9.03

Hopeful...
Thanks.
glenwf
 
Posts: 167
Joined: Wed May 20, 2009 5:34 pm
Location: Roseville, CA

Re: 1 button incerment 2 Text Entry fields?

Postby dhaupert » Wed Dec 11, 2013 2:37 pm

Hi there,

Your assumption is exactly right- since a button can only be assigned to one field, it can't possibly increment two different fields.

However, here's a possible workaround:

Create an integer field called incrementer and set it to default to zero. Assign your button to increment this field.
Now rather than show the two fields you have, create two new ones that are calculated and show them. The calculation would be the existing fields plus the incrementer field.

Thus the button should increment both of those fields effectively!
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: 1 button incerment 2 Text Entry fields?

Postby glenwf » Wed Dec 11, 2013 4:26 pm

I played with that, and that does increment both displayed fields, but since they are both calculated I can't edit one to start it over. I guess the solution to that is to make another button to decrement but that would decrement both fields I believe since they both calculate the same thing.

So, I don''t see how to edit the one field without changing the second. Am I missing something?
glenwf
 
Posts: 167
Joined: Wed May 20, 2009 5:34 pm
Location: Roseville, CA

Re: 1 button incerment 2 Text Entry fields?

Postby dhaupert » Wed Dec 11, 2013 4:30 pm

You can provide a way to edit the original fields or to decrement or increment them. Since they are added to the calculation, you can create a button to decrement just one- point it to the original numeric field you want to decrement.

Make sense?
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: 1 button incerment 2 Text Entry fields?

Postby glenwf » Thu Dec 12, 2013 9:40 pm

I get your idea and made it do what I wanted.

Thanks. The result will probably end up in a posting of a database when I can make it a little more elegant and self explanatory (my wife didn't understand so I guess it isn't ready for prime time yet).
glenwf
 
Posts: 167
Joined: Wed May 20, 2009 5:34 pm
Location: Roseville, CA


Return to HanDBase for iPhone and iPod touch

Who is online

Users browsing this forum: Bing [Bot] and 1 guest