cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Registering error when trying to add a Flow to Powerapp

I want to create a CSV file from a Gallery List (with filters and search). I want to pass the Gallery Collection straight to the Flow. I have created this Flow but it fails with the unhelpful error message of "Registering error" when I try to add it to my Powerapp.  See attached screen shot of Flow.   Can anyone explain to me what causes this Flow to not be able to be registered inthe PowerApp?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous,

 

Depends on the column number, the array creation might be a little different.

See the following thread for the details:

Record parameter

 

For two columns, you could take use directly the method mentioned in the thread above, with first and last function.
For Multiple columns, use Split(items('Apply_to_each'),'&')[0], Split(items('Apply_to_each'),'&')[1]....

Array item could be selected by integer starts from 0.

Here is the steps:

The function I used to generate the string in PowerApps is:

Concat(Table({ID:1,Value:"Apple"},
{ID:2,Value:"Pear"},
{ID:3,Value:"Melon"}),
ID & "&" & Value & "*")

The Collection used for testing is:

Table({ID:1,Value:"Apple"},{ID:2,Value:"Pear"},{ID:3,Value:"Melon"})

The Flow steps should be:

1. PowerApps trigger,

2. Compose action, used to choose Ask in PowerApps,

3. Filter Array, as mentioned in the thread above,

4. Two Variables, first for object, second for Array,

5. Apply to each, split each record, then save it into an array

6. Compose to show the results.

See screenshots:

121.PNG122.PNG123.PNG124.PNG

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-micsh-msft
Community Support
Community Support

Hi @Anonymous,

 

I think the issue here should be caused by the Parameter passed into the PowerApps trigger.

Currently only string type is supported.

 

A possible workaround here is:

1. Concat the array within PowerApps using the concat () function, with additional seperator, such as " ; ", or "*", then pass it through the the flowname.run,

2. Within Flow, add a compose action, then use function split to create an array

split('<text>', '<separator>')

3. After that, use the compose result as the from parameter of the create CSV table.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-micsh-msft,

Thanks for the information. It sure would be useful if some information was supplied about why the app does not register. Would save a lot of time trying to work out what the issue is.  The Flow is happy to let you select "Ask from PowerApps" on something that requires an Array, which is not very helpful if that is not going to work at the other end.

 

What I am trying to do here is to create a CSV file from a Collection (2D array). Using your solution I can create a string value that has both an item separator and a record separator, but I don't know how to recreate the 2d array within the Flow, to feed into the Create CSV table. I have tried first Splitting out the record, but then cannot feed that record back into another Split. I have also tried to use an "Apply to each" on the Compose Output from splitting into records, but it doesn't let me access each record. I have also tried just using a single separator for both records and items, and listed the column names in the "Custom" headers rows in the Create CSV file hoping that it might decide that this was the definition of a row, but this just resulted in an empty file except for the headers.

 

Is there a way to pass a collection as text and then reformat it as records and rows, or do I have to write it out to another Sharepoint List and read it in again to the Flow?

Hi @Anonymous,

 

Depends on the column number, the array creation might be a little different.

See the following thread for the details:

Record parameter

 

For two columns, you could take use directly the method mentioned in the thread above, with first and last function.
For Multiple columns, use Split(items('Apply_to_each'),'&')[0], Split(items('Apply_to_each'),'&')[1]....

Array item could be selected by integer starts from 0.

Here is the steps:

The function I used to generate the string in PowerApps is:

Concat(Table({ID:1,Value:"Apple"},
{ID:2,Value:"Pear"},
{ID:3,Value:"Melon"}),
ID & "&" & Value & "*")

The Collection used for testing is:

Table({ID:1,Value:"Apple"},{ID:2,Value:"Pear"},{ID:3,Value:"Melon"})

The Flow steps should be:

1. PowerApps trigger,

2. Compose action, used to choose Ask in PowerApps,

3. Filter Array, as mentioned in the thread above,

4. Two Variables, first for object, second for Array,

5. Apply to each, split each record, then save it into an array

6. Compose to show the results.

See screenshots:

121.PNG122.PNG123.PNG124.PNG

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Thanks for the detailed response. I have implemented this successfully.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,590)