cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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
Highlighted
Community Support
Community Support

Re: Registering error when trying to add a Flow to Powerapp

Hi @NPBA_AT,

 

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
Highlighted
Community Support
Community Support

Re: Registering error when trying to add a Flow to Powerapp

Hi @NPBA_AT,

 

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.
Highlighted
Helper II
Helper II

Re: Registering error when trying to add a Flow to Powerapp

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?

Highlighted
Community Support
Community Support

Re: Registering error when trying to add a Flow to Powerapp

Hi @NPBA_AT,

 

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

Highlighted
Helper II
Helper II

Re: Registering error when trying to add a Flow to Powerapp

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

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (9,627)