This topic is locked

Need to be able to add a date field with a "+" sign

12/17/2019 5:03:55 AM
ASPRunnerPro General questions
T
Tom16 author

Hi,
My cliënt is a beauty salon that uses a database for registering appointments.

I need to be able to add a new appointment date every time a "+" sign (or "new") is clicked on.

Anybody any ideas?
Tom

admin 12/17/2019

Sounds like the job for a built-in 'Add new' functionality. Not really clear what causes the trouble.

T
Tom16 author 12/19/2019



Sounds like the job for a built-in 'Add new' functionality. Not really clear what causes the trouble.


Hi Sergey,
Thanks for your answer. An "Add new" (Insert new) button might be what I'm looking for.

I found the possibility in the ADD section of Designer.

I have no idea how to add the code for adding a new date field.

There is a difference between the LIST and ADD section with regard to the Insert standard button.
Could you direct me?
Tom

admin 12/19/2019

I'm still confused. This is a built-in functionality, there is no need to insert any buttons, it appears there by default. Proceed to 'Choose pages' screen and make sure 'Add page' option is enabled.

T
Tom16 author 12/20/2019



I'm still confused. This is a built-in functionality, there is no need to insert any buttons, it appears there by default. Proceed to 'Choose pages' screen and make sure 'Add page' option is enabled.


Hi Servey,
It's by no means my intention to get you confused.

The add pages is for adding a complete page.
What I need is to add a new date field to an existing record.
EG: cliënt John Doe has an appointment on 01-01-2019 the next time he has an appointment on 02-02-2019.

I need to add that new appointment via a button so that a new date field emerges and so on...
Like this:

Tom

admin 12/20/2019

I see what you saying and this may not be the way how it works. You cannot just a random field to the form as ASPRunnerPro won't know where to save it in the database. Do you already have all those date fields in the database? What is your database structure?

T
Tom16 author 12/23/2019



I see what you saying and this may not be the way how it works. You cannot just a random field to the form as ASPRunnerPro won't know where to save it in the database. Do you already have all those date fields in the database? What is your database structure?


Hi Sergey,
I have allready a set of database fields for this purpose.

They are called Datum_behandeling2 to Datum_behandeling10.

I would be handy if an action could add a database field to the database each time a new date is added, but with set fields works too.

I've attached the database structure.
Tom

[media]http://www.tcfbv.nl/transfer/f.php?h=36HITBkz&d=1[/media]

PDF

admin 12/25/2019

I see what you saying. This can be done but quite a bit of custom coding will be required.
First, you need to add all those date fields to the form along with "plus" and "delete" buttons next to each. On the initial page load, you will need to hide all of fields and their buttons except the first one.
Then you need to write the code for all those buttons. Delete buttons should hide the associated field. Plus buttons should display the next field.
Maybe an easier approach to use master-details and save all those generic list items in the details table?

T
Tom16 author 1/2/2020



I see what you saying. This can be done but quite a bit of custom coding will be required.
First, you need to add all those date fields to the form along with "plus" and "delete" buttons next to each. On the initial page load, you will need to hide all of fields and their buttons except the first one.
Then you need to write the code for all those buttons. Delete buttons should hide the associated field. Plus buttons should display the next field.
Maybe an easier approach to use master-details and save all those generic list items in the details table?



Hi Sergey,
Is this something that a subscription to a support plan can help me with?
Tom

admin 1/14/2020

Yes, if you have a valid subscription we can help you configure it.