web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Help with Collecting t...
Power Apps
Answered

Help with Collecting to a new Collection

(0) ShareShare
ReportReport
Posted on by 8

I'm using the following code and getting errors.

 

If(PictureColvar=1,Collect(PictureCol,{Image:UploadedImage2.Image},Question:1)

 

Errors Recieving with this formulas are as follows:

1.  Unexpected characters, The formula contains 'ParenClose' where 'Colon' is expected

2.  Name isn't valid.  This identifier isn't recognized -

 

I believe the second error is due to the PictureCol and Question identifiers and I don't know why.  PictureCol is a new collection and wouldn't yet be identified yet and Question is part of an existing collection.  Please offer any help you can I'

 

Categories:
  • Verified answer
    Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    Are you trying to create a collection with a record that has a value for both Image and Question when PictureColvar=1?

     

    If so, then it would look like this:

    If(PictureColvar=1,Collect(PictureCol,{Image:UploadedImage2.Image ,Question:1})

  • Millwalluser Profile Picture
    8 on at

    I'll give it a try

  • Millwalluser Profile Picture
    8 on at

    Yes, this is what I'm attempting to do but for a set of 8 separate distinct audit questions which I have already identified.  I tried this solution and I'm still receiving the same errors.  

     

    Error3.jpgError2.jpgError.jpgCode.jpg

  • Millwalluser Profile Picture
    8 on at

    I went back and retyped the formula and it worked no errors.  Thanks!!!!!!!  I'm new to PowerApps and I've been working on this bug for days.  

  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    The closing squiggly bracket "}" needs to be after the question number. 

     

    If(PictureColvar=1,Collect(PictureCol,{Image:UploadedImage2.Image ,Question:1})

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard