Embedding Canvas apps
Today we will have a look on how to embedd FormsPro surveys into a model driven app, to capture feedback like KYC check, Risk profile or Client Satisfaction surveys for an account.
First we add a new section to our account form, where we add one mandatory field, that will host the canvas app:
Then we double click on that field and navigate to the controls tab. Here we add a new controll of type Canvas app:
After clicking on add, we select this control for the web form (at the moment embedded Canvas apps are not supported in the mobile version) and click on customize to create the app:
Once the Power Apps Studio has launched, we add a new screen, that will be our home page:
As a next step we get rid of the form that has been added by default, since we do not need it in our case:
Now we add a label to our home page, asking the user to select a survey:
Then we add a drop down, where the user can choose the survey:
In the properties of the drop down we select the entity "Forms Pro surveys" in the items property and the field name in the value property:
To launch the survey screen we add a button:
Now we add a new screen and add the "Forms Pro" control:
To open the survey, chosen in the drop down, we enter following formula in the advanced properties of the Forms Pro control:
Now we define the transition for the button, that shall launch the survey:
We are done configuring our Canvas app and define a name for the app and choose an icon:
Next we save and publish the app:
Now the app id is filled out in our custom control in our model driven app:
(I would recomend to also move to tab display and hide the field label, else it would be shown next to the canvas app).
Finally we save and publish our account form in the model driven app:
After clicking on the Fill out button, the chosen survey is rendered:
When the survey is submitted a confirmation page is displayed:
If we navigate to our survey in CRM, the response is shown:
The response is not yet linked to the correct account. For that purpose we would have to pass the context to the survey:
In the properties of the drop down we select the entity "Forms Pro surveys" in the items property and the field name in the value property:
To launch the survey screen we add a button:
Now we add a new screen and add the "Forms Pro" control:
To open the survey, chosen in the drop down, we enter following formula in the advanced properties of the Forms Pro control:
Now we define the transition for the button, that shall launch the survey:
We are done configuring our Canvas app and define a name for the app and choose an icon:
Next we save and publish the app:
Now the app id is filled out in our custom control in our model driven app:
(I would recomend to also move to tab display and hide the field label, else it would be shown next to the canvas app).
Finally we save and publish our account form in the model driven app:
Time to Test
Lets open one test account and see if our new app is correctly rendered. And here it is:After clicking on the Fill out button, the chosen survey is rendered:
When the survey is submitted a confirmation page is displayed:
If we navigate to our survey in CRM, the response is shown:
The response is not yet linked to the correct account. For that purpose we would have to pass the context to the survey:
Then we could use this context to personalize the survey or to link the response with the account (e.g. with a flow listening on forms pro responses).
Comments
Post a Comment