I have a situation that I can't seem ti get my head wrapped around.
I need staff to be able to select dates from a date picker for each vacation day they have left. For example, if I have 15 vacation days allowed I need to be able to select up to 15 dates. Once the desired dates are selected, I need to enter them (Each date in a new record) into the database all at once and send an email to the supervisor.
Is the multi-insert what I am looking for? Any pointers on how to use it or how I would go about accomplishing this? I just can't get my head around it.
On the server side you can just split the values (dates) sent by the $_POST by , character and repeat them using a repeat step. Put insert inside the repeat and pick the value from the repeat.
In the repeat step select the date picker POST variable. Use the split formatter to split the POST variable value by a comma ,
Add insert step inside the repeat step.
Use the value returned by the repeat step to insert a date in the database.
Actually are you using a date picker or a date range picker?
There is nothing in the developer console. All clean. Gives a 200 status with and without as well. Just with the date picker no data gets inputted at all.
Goes into this: $_POST.record.selected_date = null
But this: $_POST.record[0].selected_date = 05/06/2009
Is this normal?
Maybe you can use a set value like this: $_POST.record[0].selected_date+','+$_POST.record[1].selected_date+','+$_POST.record[2].selected_date
And then use the , for the repeat..
Thanks Franse, I can't use the set value as you suggested as there can be as many as 25 inputs. The number of inputs will be determined by a drop menu or text input.
I think the issue has to do with the hidden field that date picker adds. It's not being recognized.