cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Errors on Collect

I am very new to Power Apps, and I am having an issue with creating a collection.  My code is below, but I cannot figure out why I keep receiving errors on it.  For FlowResponses, I am receiving the error 'Name isn't valid.  This identifier isn't recognized.'  For the MECHANIC.run command, I am receiving the error 'Invocation of unknown or unsupported function.'  MECHANIC is the name of a flow I created.  

 

 

Clear(FlowResponses);
UpdateContext({resultMessage: "", submitWasClicked: true});
ForAll(
    Filter(
        PhotoLog,
        jobId = JobList.Selected.jobId
    ),
    Collect(
        FlowResponses,
        {
            response: MECHANIC.Run(
                Image,
                FolderPath & type,
                name & "_" & Text(Now(), "[$-en-US]HHmmss") & ".png")
            )
        }
    )
);

 

 

I have no idea what I am doing wrong , and I hope that I have given enough information.  Thank you in advance for any help that can be given.

9 REPLIES 9
Super User III
Super User III

Hi @Skeeve ,

You cannot run commands inside the {} of a Collect or Patch (and a number of others) statement. 

I can see what you are trying to do (collect responses from a Flow). You would normally do this one at a time with the Set command and capture the response as a Variable.
I cannot test this, but as an experiment, try

Collect(
   FlowResponses,
   MECHANIC.Run(
      Image,
      FolderPath & type,
      name & "_" & Text(Now(), "[$-en-US]HHmmss") & ".png")
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Thank you.  After testing your solution, I am now getting the error, 'The function ForAll has some invalid arguments.'

@Skeeve ,

There is no ForAll in what I posted.

The ForAll is in my original post.

 

Thank you.

@Skeeve ,

I need to see your entire code that has errors, not guess what you might have changed.

Can you please post this with what is showing as an error and what the error is.

The function Clear has some invalid arguments.

FlowResponses name isn't recognized.

The function ForAll has some invalid arguments.

The function Collect has some invalid arguments.

Mechanic.run is getting invocation of unknown or unsupported function.

 

 

Capture.PNG

 

Thank you for your help.

Thanks @Skeeve ,

Getting back to basics, put this on a button and see if the Flow runs - we will need to "build out" from there until the error is found

MECHANIC.Run(
    Image,
    FolderPath & type,
    name & "_" & Text(Now(), "[$-en-US]HHmmss") & ".png")
)

Hi @Skeeve ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @Skeeve ,

I am following up this post to see if it can be closed if you obtained the result you were looking for.

Please click Accept as solution if my post helped you solve your issue as this will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,209)