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 / Merging collections
Power Apps
Answered

Merging collections

(0) ShareShare
ReportReport
Posted on by 340

Hi,

 

I have a requirement to pass 2 collections to Flow. 

 

The first collection is called "steps" which is then passed to a collection "finalSteps". Once i run my first action it looks like this:

da1ve_0-1683772866516.png

I am then using an attachment control to upload images and descriptions (within a Gallery).

 

Then I am using a button to bring it all together and pass it to Flow

 

Collect(
 finalSteps,
 ShowColumns(
 AddColumns(
 Gallery2.AllItems, 
 "description", 
 TextInput23.Text, 
 "base64", 
 With(
 {varDemoFromAttachmentControl: JSON(Image8.Image, JSONFormat.IgnoreBinaryData)}, 
 Mid(
 varDemoFromAttachmentControl, 
 Find(",", varDemoFromAttachmentControl) + 1, 
 Len(varDemoFromAttachmentControl) - Find(",", varDemoFromAttachmentControl) - 1
 )
 )
 ), 
 "description", 
 "base64", 
 "Name"
 )
);
//'Process-UploadMultipleImages'.Run(JSON(finalSteps, JSONFormat.IndentFour));

 

Once I press the button, this is what the collection looks like

 

da1ve_0-1683774876406.png

 

Then in Flow its failing on the Parse JSON action (im guessing its my schema)

 

da1ve_1-1683774926310.png

[
 {
 "message": "Required properties are missing from object: Name, base64, description, stepTitle, stepDescription.",
 "lineNumber": 0,
 "linePosition": 0,
 "path": "[0]",
 "value": [
 "Name",
 "base64",
 "description",
 "stepTitle",
 "stepDescription"
 ],
 "schemaId": "#/items",
 "errorType": "required",
 "childErrors": []
 },
 {
 "message": "Required properties are missing from object: Name, base64, description, stepTitle, stepDescription.",
 "lineNumber": 0,
 "linePosition": 0,
 "path": "[1]",
 "value": [
 "Name",
 "base64",
 "description",
 "stepTitle",
 "stepDescription"
 ],
 "schemaId": "#/items",
 "errorType": "required",
 "childErrors": []
 },
 {
 "message": "Required properties are missing from object: Name, base64, description, stepTitle, stepDescription.",
 "lineNumber": 0,
 "linePosition": 0,
 "path": "[2]",
 "value": [
 "Name",
 "base64",
 "description",
 "stepTitle",
 "stepDescription"
 ],
 "schemaId": "#/items",
 "errorType": "required",
 "childErrors": []
 }
]

 This is what i have for my Schema

It looks like there's a small issue with the schema you provided. Specifically, the property name for "stepDetail" in the finalSteps collection is different from the property name for "stepDescription" in the schema. Make sure the property names match exactly.

Also, when defining the schema, make sure to use the exact same casing and spelling for property names as in your collection. For example, in your schema, you have "stepTitle" with a capital "T", but in your collection, it's "steptitle" with a lowercase "t". Make sure these match exactly as well.

Here's an updated schema that should match your collection:

json
Copy code
{
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "Name": {
 "type": "string"
 },
 "base64": {
 "type": "string"
 },
 "description": {
 "type": "string"
 },
 "stepTitle": {
 "type": "string"
 },
 "stepDetail": {
 "type": "string"
 }
 },
 "required": [
 "Name",
 "base64",
 "description",
 "stepTitle",
 "stepDetail"
 ]
 }
}

I tried copying the output of Compose and generating from sample but it gave me this

da1ve_2-1683775034753.png

Any idea where i am going wrong or am i passing the collections in Power Apps incorrectly?

 

Thanks,
David

Categories:
  • Verified answer
    Atom_Chs Profile Picture
    48 on at

    Hey ! da1ve, with your error message, i think i have an idea.

     

    In your schema, at last part "required", delete all items in array like this : 

    "required": []

    If you don't want required items, just delete the "required" part.

     

    And try again.

     

    Let me know if it works! 

  • da1ve Profile Picture
    340 on at

    Hi @Atom_Chs ,

     

    Thank you - that worked 🙂

  • Digital Profile Picture
    1,207 on at

    you should look in to using the Power Apps v2 trigger in Power Automate. It allows you set parameters one of which is File. This is much easier way to upload files to a doc lib as you don't have to do all that text manipulation on the image base64.

     

    https://www.matthewdevaney.com/power-apps-easiest-way-to-upload-files-to-a-sharepoint-document-library/

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard