09/08/2020

How to show a successfully submitted record's data confirmation in a canvas application

In this post let us see, how to show a successfully submitted record's data back on to the form, as a confirmation.

Take two screens 

  • Home Screen
  • Success Screen
On Home Screen:
Take a Form Control on the Home Screen and map it to respective entity. In this post we are mapping it to Registrations entity. Take a Button Control and input the below expression, to create records into Registrations Entity.

SubmitForm(frmRegistration)
Now, let us implement how to redirect the user to Success Message screen to successful record submission. In order to achieve this, we are going to make use of one of the Form Control's properties - OnSuccess. So, OnSuccess we are going to implement Success Screen navigation as below
Navigate('Success Screen')

 Success Screen

Take a label to show - success message, as below

"Registration was successful. Registration Id: " & frmRegistration.LastSubmit.'Registration Number'

LastSubmit property of a From Control helps us to show the successfully submitted record's details, including any server generated fields. So, we are leveraging this property.


06/08/2020

Redirect to a specific screen in Power Apps (Canvas App)


Here is a way to redirect to a specific screen in Power Apps (Canvas App)


The final URL looks like below https://apps.powerapps.com/play/xxxxxxxx-2c29-4c7e-b18e-a900e34c0e12?title=issueWithPhone

Get the App URL:

  1. Go to make.powerapps.com
  2. Select your canvas app. Click on three ellipses(...) and go to details
  3. copy the app URL

Add the changes in Canvas App to redirect to a specific screen or record:

  • On App Start,take a variable as below- Set(varTitle,Param("title")).
  • Use Navigate Screen to redirect to a specific screen the screen as below-If(!IsBlank(varTitle),Navigate(ViewMyRequest)).
  • We can make use of that variable to filter data and map it to form/gallery as per the requirement

02/08/2020

Convert an array to string in Power Automate (MS Flows)

converting an array value to a string using Power Automate out of the box function.

"how to convert an array to string" in MS Flows.

Basically, we can use "split" function to convert an array into string but we may end up having extra comma to the last value. To remove that we have to use another expression which checks for the string length and removes the last character [

substring(variables('varListOfRequestIDs'),0,sub(length(variables('varListOfRequestIDs')),1)) ].

To avoid this round about process rocess, we can leverage Power Automate's simple and out of the box function - join

Here is an to show how can we convert an array to string. for instance let's consider, we have an array [796759,933436,926050,1388108,762632,764554]. But as per the requirement, we need to convert it to string and send that value as 796759,933436,926050,1388108,762632,764554. 

varListOfRequestIDs = [796759,933436,926050,1388108,762632,764554]

varStringListOfRequestIDs:join(variables('varListOfRequestIDs'),',')

 gives us 796759,933436,926050,1388108,762632,764554