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

Notifications

Announcements

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:
I have the same question (0)
  • 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard