conditional choice and two dbloader actions

artcode 08 Apr, 2014
I have to create a form with a conditional db order action.

Like:

if radio button "one" acquire last row of table x
if radio button "two" acquire last row of table y

I just find how to retrieve last value from external table, I need suggestion to compone the form with the correct order of the actions.

It's better to use a custom code before the two dbloader action or something different?

thanks and bye.
fede
GreyHead 08 Apr, 2014
Hi fede,

Sorry but I don't understand your question. What does 'acquire last row of table . . .' mean exactly?

Bob
artcode 10 Apr, 2014
I create a form with two db loader actions with a where statement .

I could capture the value of a column (autoindex autoincrement field in the db) as cf_id of the two external tables.
Then after that I have republish the value in the form (the last row of the column of the field cf_id)in a field (printone nr).

I have elaborate a first solution with a javascript code that make a conditional choice with a radio button
that could conditional select printone (1stselection) or printtwo(2nd selection).

The script in the first case add 1 to the value that count the number of print of printone and put 0 in the value of printtwo
because if I print the first choice I don't have to increment the second counter of printtwo.

Everything it's ok now, and I could obtain the correct values in the fields, but I could think If there is a "more" elegant solution
to increment two counter value with a conditional choice.

Note: all the value are recorded in a db table from a previous form a part the fields that count the number of the selection.
The user use only the radio button as a choice for the kind of print.

Thanks

bye
fede
This topic is locked and no more replies can be posted.