cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ashwagamz
Frequent Visitor

specified attachments fromate

Hi there,

 

I have an arraye of multiple formats :

Set(formats,[".png",".jpg","jpeg",".svg"];

 

And I want to check if the attachment formate type that uploaded by user is in these formates.

I tried this code but does not work:

Set(formates,[".png",".svg",".jpg",".jpeg"]);

if(Concat(DataCardValue29.Attachments.Name,Name&",") in formates , Notify("correct"),Notify("incorrect"));
1 ACCEPTED SOLUTION

Accepted Solutions
SagarVIS96
Resolver II
Resolver II

Hey,

you can try this below code which may solve your issue.

Set(formates,["jpg","png"]);
If(Last(Split(First(DataCardValue2.Attachments).Name,".")).Result in formates,"Correct","Not Correct")

Thanks

View solution in original post

1 REPLY 1
SagarVIS96
Resolver II
Resolver II

Hey,

you can try this below code which may solve your issue.

Set(formates,["jpg","png"]);
If(Last(Split(First(DataCardValue2.Attachments).Name,".")).Result in formates,"Correct","Not Correct")

Thanks

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,985)