Hello,
What is explained in this video is something i also want to make but i run into a problem. The variables are not recognized. However, when I use a ";" instead of "," in the first line, that goes well. But then I can't use the second 'Set". It will not be recognized.
First Line
So when i use this code "Set(varAttachmentControl; JSON(Image1.Image;IncludeBinaryData))" it works.
But when i use "Set(varAttachmentControl, JSON(Image1.Image;IncludeBinaryData))" it doesnt work.
I also have problems with the second line which is shown from 05.00 it the video. That line does not work with me. The variable and al the other commands are not recognized.
Does anyone have an idea how i can solve this?
Solved! Go to Solution.
Here you go
Clear(colAttachmentGallery);;
ForAll(Gallery1.AllItems;
Collect(
colAttachmentGallery;
{
Title: lblTitle.Text;
DataStream: imgDataStream.Image
}
)
)
That happened becouse you need to use ;; to use 2 formulas, insted of ; as in the tutorial.
If this solved you problem, please condider to give Kudo and mark as a Solution.
Clear(colAttachmentGallery);;
ForAll(Gallery1.AllItems;
Collect(
colAttachmentGallery;
{
Title: lblTitle.Text;
DataStream: imgDataStream.Image
}
)
);;
UploadFilestoSharePointLibrary.Run(JSON(colAttachmentGallery;JSONFormat.IncludeBinaryData))
here u go
Just replace the "," with ";" .
It depends on your area.
For the second line of code, same answer! Replace all the "," with ";".
You can read more here --> PowerApps upload file to SharePoint document library - SPGuides
Have a nice day
Thx, @Masino , i follow now the steps in your link. I then get a problem with colAttachmentGallery . It does not regognize the code like in this screen.
What error do you get?
The name is invalid. colAttachmentGallery not recognized
and
The function Clear only has invalid arguments
OnSelect = Clear(colAttachmentGallery); ForAll( Gallery1.AllItems; Collect( colAttachmentGallery; { Title: lblTitle.Text, DataStream: imgDataStream.Image } ) );
Try this one
Still get the same errors
have you checked the names ? it sound strange, it's working to me
checked all the names. Gallery1, lblTitle and imgDataStream are correct. The names are the same as in the instructions. When i go to collection there is no colAttachmentGallery so i think the problem is something there?
There is only one collection named attachColelction
You can see only one collection becouse this one, colAttachmentGalley , has not been created yet.
This is happening becouse your info inside the collection are not valid.
Is the image name exactly "imgDataStream", and the text field "lblTitle" ?
Just in case, can you provide a screenschot of your app with the field selected?
User | Count |
---|---|
252 | |
101 | |
94 | |
47 | |
38 |