DMXzone Server Connect Support Product Page

Answered

Merging Server Connect into existing workflow

Asked 19 Feb 2016 12:55:56
1
has this question
19 Feb 2016 12:55:56 David Woolley posted:
I need to use Server Connect in my workflow now, as HTML5 File Upload requires this.
How do I incorporate Server Connect with all the existing Data Bindings, Connections & Updater Actions in my site?

Replies

Replied 19 Feb 2016 13:45:06
19 Feb 2016 13:45:06 Teodor Kuduschiev replied:
Hi David,
Please wait until the Data Bindings, Server Connect and the rest of the Database Tools updates on Wednesday. There are some changes in the way you create/use data sources, which will be documented with the release. It will be much easier to do everything from within the Server Connect now.
Replied 24 Feb 2016 16:45:19
24 Feb 2016 16:45:19 Teodor Kuduschiev replied:
Hi David,
Please check the newest video tutorials on the server connect page.
Replied 02 Mar 2016 10:05:46
02 Mar 2016 10:05:46 David Woolley replied:
Hi Teodor
I tried setting up a simple Insert Record following the tut "Insert Records into a Database".
New record is not being added.

I set up an Insert Record action, and a Query action for listing existing records in SC.

Does the form button not require the RUN behavior, or is this taken care of in the executor action script?

The Update Executor UI does not allow the $FORM input variables to be added to the Input Data panel.
Error: "Please use a Server Action that has defined assignment columns in it"
The Action Builder have the correct values in the Columns panel
For example: {{$_POST.fieldname}}

Also clicking on the Behaviors button in the Server Connect Action Executor for the Insert Record action, I selected:
onSuccess > Control DMXzone Server Connect Action > Run & executor_name

BTW this behavior step above is NOT in the tut.

I set up another page for inserting the record using the "old" method without Server Connect, and everything works fine. Can't understand why the new SC method is not working.

Cheers
Dave



Replied 02 Mar 2016 10:53:01
02 Mar 2016 10:53:01 Teodor Kuduschiev replied:
Hi David,
I cannot really understand the issue and cannot understand what exactly you are doing?
It is explained how to run the action executor in the tutorial ... no behaviors are needed to do this. Also what exactly are you trying to bind and where?
It is really simple to do this and it is explained as simple as possible in the tutorial. Please provide the exact part where you have issues with and please provide screenshots of what exactly you are doing?
Replied 02 Mar 2016 11:49:19
02 Mar 2016 11:49:19 David Woolley replied:
I've followed the tutorial exactly as you have it, using my own simple table .
Insert form with a table below this showing the existing records.

No behaviors added!

Server Connect Action Executor:
Input Data panel empty as in the tut.

I'll mail you some screenshots - I can't figure out how to include an image here.

As I said it's all working fine using the old Data Source method without Server Connect.
Adds the record then refreshes the table.

Replied 02 Mar 2016 12:02:19
02 Mar 2016 12:02:19 Teodor Kuduschiev replied:
Old methods are now deprecated and should not be mixed with the new ones. Awaiting your screenshots.
Replied 02 Mar 2016 13:43:07
02 Mar 2016 13:43:07 David Woolley replied:
Hi Teodor
Eventually found the problem! Nothing to do with the Server Connect.
The form button code was incorrect - previously I was using this:

<button type="button" class="btn btn-primary">Add record</button>


Using the old method without Server Connect, if the update behavior was attached to the button, it did not need to have type="submit"

But as I was copying & pasting (not such a great idea!) to the new page, this slipped thru.

This works:
<button type="submit" class="btn btn-primary">Add record</button>


Thanks
Dave

Replied 02 Mar 2016 14:33:11
02 Mar 2016 14:33:11 David Woolley replied:
The page was not refreshing the record list below the form, so I added a Server Connect onSuccess behavior to RUN the query action executor. That works!
Replied 02 Mar 2016 14:45:02
02 Mar 2016 14:45:02 Teodor Kuduschiev replied:
Hello David,
I've checked your screenshots and everything seems to be fine. You must use a submit button indeed, then you can tell the action executor to run "On Form Submit".
Of course as usual, you should add a behavior, if you want to refresh the query results and that's the right way of doing this:

Quoteso I added a Server Connect onSuccess behavior to RUN the query action executor.

Replied 02 Mar 2016 15:00:47
02 Mar 2016 15:00:47 David Woolley replied:
Thanks Teodor - getting the hang of it!

Reply to this topic