cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rchavhanCAP11
Level: Powered On

Collection is created but its not fetching/collecting data from PowerApps screen

Scenario: According to business requirement, we need to create a Canvas PowerApp in which, we should be able to store two things in collection. First thing is text and second thing is a picture. PowerApps which is created for it:

We have created a powerapp for above requirement in which we taken a Input Text box(for storing Name), a Camera Control(for click picture), a Image field for displaying/showing captured image and a button to collect/store the Name and Captured Image in collection.
For better understanding here I am attaching screenshot of my powerapp.
1.png

2.pngcode written on button

Challenge/Problem:

When I am clicking on button to send it into collection its not working. In collection I can only able to see Collection Name(Details), and collection columns name(Name & Img).

 

3.pngcollection picture
I want to see the Name which I have entered in Textinput and Image(capture through Camera Control).
Note: I am using mobile phone app to try this functionality.
Thanks In Advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Collection is created but its not fetching/collecting data from PowerApps screen

Hi @rchavhanCAP11 ,

Could you please share a bit more about your scenario?

Does the captured Camera picture display well within the Image field (Image control) in your app?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:

1.JPG

 

2.JPG

 

As an alternative solution, please consider take a try with the following workaround:

Set the OnStart property of the App control to following:

 

ClearCollect(Details, {Name: "", Img: SampleImage});
Remove(Details, First(Details))

 

or

 

ClearCollect(Details, {Name: "", Img: Image1.Image});
Remove(Details, First(Details))

 

 

Then set the OnSelect property of the "Send in Collection" button to following:

 

Patch(
      Details,
      Defaults(Details),
      {
        Name: TextInput1.Text,
        Img: Image1.Image
      }
)

 

then save and re-load your app (fire the OnStart property of App), then try it again within your Mobile device, check if the issue is solved.

 

More details about the Patch function in PowerApps, please check the following article:

Patch function

 

Best regards,

Community Support Team _ Kris Dai
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

2 REPLIES 2
Dual Super User
Dual Super User

Re: Collection is created but its not fetching/collecting data from PowerApps screen

Two things to make sure you have data to store in the collection.

1) Is the Image property of the control set to Camera1.Photo?

2) Did you click on the Camera1 control to actual have the camera take a picture?

 

I built a quick POC using your design and mine worked correctly if the two steps above were followed.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: Collection is created but its not fetching/collecting data from PowerApps screen

Hi @rchavhanCAP11 ,

Could you please share a bit more about your scenario?

Does the captured Camera picture display well within the Image field (Image control) in your app?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:

1.JPG

 

2.JPG

 

As an alternative solution, please consider take a try with the following workaround:

Set the OnStart property of the App control to following:

 

ClearCollect(Details, {Name: "", Img: SampleImage});
Remove(Details, First(Details))

 

or

 

ClearCollect(Details, {Name: "", Img: Image1.Image});
Remove(Details, First(Details))

 

 

Then set the OnSelect property of the "Send in Collection" button to following:

 

Patch(
      Details,
      Defaults(Details),
      {
        Name: TextInput1.Text,
        Img: Image1.Image
      }
)

 

then save and re-load your app (fire the OnStart property of App), then try it again within your Mobile device, check if the issue is solved.

 

More details about the Patch function in PowerApps, please check the following article:

Patch function

 

Best regards,

Community Support Team _ Kris Dai
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

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,614)