Hi,
What I want goes as below.
1) Using lookup, get an item from SharePoint list, which may have single or multiple attachments.
2) get the attachment(s) and set it in a variable
3) show it on attachment control on form, using the variable
In my scenario, I'm not using Gallery, so I cannot use ThisItem.
Using ThisItem, I know we can get attachment like this: ThisItem.'{Attachments}'
But in my case, users will open the form screen directly from a link with parameter ID of the item (the link is distributed via email).
So, I'm looking up an item by the parameter ID, but can't get `{Attachments}'
I'm writing like this: Lookup([SPlist], ID=[ParameterID]).XXX
But I do not see the option '{Attachments}' to replace XXX.
It seems there is some difference between data lookup gets and data ThisItem holds.
Any ideas?
Thanks!
Solved! Go to Solution.
Hi @HiroakiSasaki ,
Firstly you cannot save an attachment as a Variable. You can display attachments from another list in a gallery with
LookUp(
OtherList,
ID = YourIDParameter
).Attachments
and then the name and (if an image file) the image in this gallery.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @HiroakiSasaki ,
Firstly you cannot save an attachment as a Variable. You can display attachments from another list in a gallery with
LookUp(
OtherList,
ID = YourIDParameter
).Attachments
and then the name and (if an image file) the image in this gallery.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi, @WarrenBelz !
Thank you for sharing knowledge!
As you wrote, if I designate the gallery control, which has the target SharePoint List as items source, I successfully get the attachment.
LookUp(Gallery.AllItems,ID=Param("ID")).Attachment
But I don't get what you mean by saying you cannot save an attachment as a Variable.
Set(varAttachment,LookUp(GalInquiry.AllItems,ID=Param("ID")).Attachment)
After executing the function above, I got below result. Doesn't it mean I saved the attachments in a table-type variable?
Hi @HiroakiSasaki ,
Sort of - you did not save the actual file however - only the references to it (you cannot download it as you would from an attachment control)
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
199 | |
52 | |
41 | |
39 | |
35 |
User | Count |
---|---|
263 | |
86 | |
71 | |
69 | |
66 |