HI,
I have Gallery linked to a sharepoint document library.
I am able to link the Title
I would like to show the File Type icon associated with the file.
I am unable to see the File Type icon in the fields.
How can i get the File Type icon associated with the file?
Thanks
Solved! Go to Solution.
Thanks to both of you.
This is what i did.
I created a document library added a custom column named FileExtnSupported and uploaded the icons.
In my powerapp, i loaded the library into my collection called Mypix.
On the Vertical gallery, on the Image File
LookUp(MyPix,Last(Split(ThisItem.'File name with extension',".")).Result in FileExtnSupported).'{Link}'
This displayed the icons.
Thanks once again,
Prabha
Hi @prabhavs ,
I am very happy that your issue got resolved and please mark the appropriate reply (which you see helps you) so that the new members of the community.
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Hi @prabhavs ,
That is not supported in PowerApps,the workaround is:
1. Add multiple file icons as part of media gallery in PowerApp
2. In vertical gallery image property write the formula as below:
If(Find("png",ThisItem.'File name with extension')>0,'png-ICON',Find("jpeg",ThisItem.'File name with extension')>0,JPG)
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Hi @prabhavs :
First of all ,thanks for @KrishnaV 's solution.
Second,my method is to use switch.I've made a test for your reference:
1\Add a image control into this gallery and set it's Image proprety to:
Switch(
Last(
Split(
ThisItem.'File name with extension',
"."
)
).Result,
"jpg",
"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3533746924,2513594553&fm=26&gp=0.jpg",
"docx",
"https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1864127023,980743153&fm=26&gp=0.jpg",
"url",
"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2796412154,3211657562&fm=26&gp=0.jpg",
"pdf",
"https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=2809522596,2400038798&fm=26&gp=0.jpg"
)
Best Regards,
Bof
Thanks to both of you.
This is what i did.
I created a document library added a custom column named FileExtnSupported and uploaded the icons.
In my powerapp, i loaded the library into my collection called Mypix.
On the Vertical gallery, on the Image File
LookUp(MyPix,Last(Split(ThisItem.'File name with extension',".")).Result in FileExtnSupported).'{Link}'
This displayed the icons.
Thanks once again,
Prabha
Hi @prabhavs ,
I am very happy that your issue got resolved and please mark the appropriate reply (which you see helps you) so that the new members of the community.
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.
Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
I just created a similar solution but without the need of uploading all the images. Simply make use of the same icons that SharePoint uses.
I've added an image control and then set the Image property to the following:
"https://res-1.cdn.office.net/files/fabric-cdn-prod_20220127.003/assets/item-types/32/" & Last(Split(ThisItem.'File name with extension',".")).Result & ".png"
Very nice, thanks!
User | Count |
---|---|
157 | |
86 | |
68 | |
63 | |
61 |
User | Count |
---|---|
211 | |
152 | |
93 | |
81 | |
70 |