Button actions not working 1) create new row 2) update fields on diff model

I am doing a Survey tool integration off my contact page.  I’ve created a custom object “SurveyResults” to store the results that has a lookup back to my Contact object.  My users will click a “New Survey” button on the Contact page to initiate the survey, which will 1) Create a new row in my SurveyResults model (sets the contact relationship but has an empty ‘score’ until the response is received from the customer) 2) Set a ‘Send Survey’ checkbox on the Contact model to TRUE - this triggers the workflow to send an email out with the survey url 3) Set a ‘SurveyID’ field on the Contact model to the id of the new SurveyResults, which I use as a merge field in my emailed url to give the customer the correct survey link 4) Set ‘Last Survey Date’ field on the contact object so I know the last time a customer was surveyed, so we can prevent a customer from being surveyed too often.

My button is set to run multiple actions:
1) Create a new row in the SurveyResults model
2) Update Field on a Row, ContactData model, to set ‘Send Survey’ checkbox to TRUE
3) Update Field on a Row, ContactData model, to set ‘Last Survey Date’ to TODAY
4) Save models - Survey Results, Contact Data
Only action for #1 above works - the new SurveyResults record gets created and Saved.  The 2 Contact fields do not get updated.
** I have not attempted the SurveyID field on the ContactData model since I can’t get the others working.

Any idea what I am doing wrong here? Thanks!

Your listed actions doesn’t mention “3) Set a ‘SurveyID’ field on the Contact model to the id of the new SurveyResults”

Pat - thanks for responding.  I’m not sure I understand your suggestion.  The Survey record is a child of the Contact.  Where would I need to set the Survey id on the contact?  I’ve included a screen shot of the user side.  The SurveyResults is a related list under the Contact.

Well you discussed that you set the surveyID on the ContactData model, but don’t have an action doing this.

Also, this workflow you’ve got. Does it clear these values?
- Send Survey
- Last Survey Date

Yes, I haven’t added the surveyID field set yet … that seems harder to get the new record ID passed over, so I wanted to get the easy stuff working first.
The workflow will clear the SendSurvey checkbox after a set period of time (maybe quarterly it will reset to False, and the contact will be eligible to re-survey.)  I envision the Last Survey Date will not clear, it will be overridden each time a survey is sent out.

Just to make sure you have access to edit and save these fields, can you do so through inline editing and the save button?

I do… yes, I have been manually triggering the checkbox to test the survey integration side.

hmmmm… remove ContactData from the save action and look to see if the fields get changed. Those buttons on the field editor will be enabled if the row has en edit pending saving. That might be a clue.

Chandra.  Would you mind granting login rights to Skuid?  Here are some instructions

Then send an email to Support@skuidify with your ORG ID and the page you are building. 

We’ll take a closer look. 

Rob - in giving you access rights, it dawned on me to check my version in this sandbox, and I was on an old version.  Upgraded and presto - it is working!!  That brings me to my next problem… passing the SurveyResults record id to a field on the Contact page so I can then merge it into my email template.  I tried to use another Update field action on my button, but that field isn’t updating.

Email coming to you with access rights…

oh oh … the merge field syntax is wrong. It needs to be something like {{$Model.AFLSurvey.data.0.Id}}

And I’m not sure this would work until after the survey is saved.

Progress!!  I tried your syntax, Pat, and it loaded ‘4’ for my id.  Not a record id, but at least it is something.  So then I added a model save action after survey creation in the button and tried again, and I got a ‘5’ in there this time.  Still not the id… humph

Is the id in your survey model?


er … uh … the surveyid field on the contact increments by one. What kind of field is it?

hahaha… I put nothing past myself.  But it is Text(25)

Ok. You create the row in the Survey model and save it, then have a field update on the contact model?

yes, exactly

Did Skuid folks get it working?