- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello everyone,
In Playbook questionnaire-type activities, the answers are only saved when submitting (clicking SUBMIT), which completes the activity.
Is there any way to save/keep the answers even without submitting?
(the idea is to allow answer some questions now and the rest later).
I assume the ideal approach would be to create a “Save” UI Action for the Questionnaire activity that stores the answers already provided, but I’m having trouble figuring out the tables used by Playbooks, so I would really appreciate any help or guidance.
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
I think you would be better off trying to change the functionality of the submit button for the questionnaire activity.
Without looking at how it is configured I would assume it updates the var field and updates the state field. You could copy the existing button, modify the functionality to eliminate the state field update so it doesn't change it to complete thus leaving the playbook at that activity. Change the label from Submit to Save and add it to the playbook activity.
Unless it has some built in functionality that interacts with the playbook beyond updating the state field of the sys_flow_data record that seems like it should be simple enough. Keep in mind if you want that functionality on all questionnaire activities across all playbooks you would add the button in the global experience otherwise create/add it to your specific experience for this playbook.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thank you very much, @John Gilmore!!!!..... thanks to your advice, I made it work!
Summary:
I had already looked at the submit button, whose script only has:
current.state = 'COMPLETE';
current.update();
When I saw that, I assumed that the "current.update();" was only required/used to save the STATE (rookie mistake, I know 😅).
After reading your message and going back to review the script, I realized my mistake:
- By using only current.update(); in the script of the custom "Save answers" button, it already saves the responses 🎉
As I said, thanks for the advice!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
No, mate. You or the agent must at least click Save after entering the information. Auto-save is not available out of the box
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thank you @Dr Atul G- LNG,
But the “Save” option on the record that the Playbook is attached to (for example, SC_TASK) does not save the answers of the Playbook Questionnaire Activity. And the Questionnaire activity, by default, only has the "Skip" and "Submit" buttons. Not "Save" 😔
We don’t need auto-save… we just need a “Save” button that works for this Playbook Questionnaire activity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I see that:
When a Playbook activity is generated, a record is created in the sys_flow_data table
In the sys_flow_data record of the Questionnaire activities, each question is shown as a dynamic variable with the format:
vars.var__m_sys_flow_data_var_425d32h671f1ea4027435e69db0059da.question_cdf2f462h68sqaa181989f9c8962ad5d
What I would need is:
- When clicking the new button (Activity Action = sys_declarative_action_assignment) on the Playbook activity, the current variables answers should be stored in the values of those sys_flow_data dynamic variables.
But I can’t manage to do it...
(I don’t know how to work with or interact with those dynamic variables from the script in the Activity action).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
I think you would be better off trying to change the functionality of the submit button for the questionnaire activity.
Without looking at how it is configured I would assume it updates the var field and updates the state field. You could copy the existing button, modify the functionality to eliminate the state field update so it doesn't change it to complete thus leaving the playbook at that activity. Change the label from Submit to Save and add it to the playbook activity.
Unless it has some built in functionality that interacts with the playbook beyond updating the state field of the sys_flow_data record that seems like it should be simple enough. Keep in mind if you want that functionality on all questionnaire activities across all playbooks you would add the button in the global experience otherwise create/add it to your specific experience for this playbook.