In this post, We will store source from the context variable field to Question response in dynamics 365.
The requirement is to store SOURCE of an anonymous survey
- We rendered form in website passing source value
- Now we will create a Power automate flow, On receive of survey response
-
- Selecting Action as Parse JSON
- Selecting Context Data
- Now we will generate a schema from the sample, Going to an already received Response record in Dynamics 365
- Then copy the context and Generate Schema
- Get Hidden Question “Source” form pro survey Question entity where name = “Source”
NOTE: THIS IS NOT MANDATORY YOU CAN MAP IT WITH ANY OTHER EXISTING RESPONSE IF NEEDED
Last Step is to add create new Forms pro question response
-
- Now we have our Received survey Response
- Survey Question = Source
- As our question was hidden and there was no answer, there will not be source Survey Question Response (We got a question in above step now we will map that question with this response)
- We will create source Question response and associate it with received survey response
- To get Source Question identifier and Question for  Source(replace name) use below expression, As we have used fetch list of record where Question = source, we need to take 1 record only otherwise we have to use Apply to all (loop)
body(‘Get_Recipient_question’)?[‘value’]?[0]?.msfp_questionid