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

Set Attachement by default power app

Hi

could anyone help me?

 

How it is possible to set a default attachment in power app?

 

I tried:

Default:

DataCard.Attachments.Value = pic.png

 

thanks in front for the help!

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @JLMVV ,

 

You could use a collection to store your image.

I assume that I have an image in my media.

vxiaochenmsft_0-1634180313892.png

Add a button control and set its onselect property to:

ClearCollect(Col,{Id:"",Value:IMG_20210111_094015,AbsoluteUri:"",DisplayName:"IMG_20210111_094015.png"})

 

Set the attament control's properties like this:

vxiaochenmsft_1-1634180374926.png

 

vxiaochenmsft_2-1634180413076.png

 

Best Regards,

Wearsky

View solution in original post

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @JLMVV ,

 

You could use a collection to store your image.

I assume that I have an image in my media.

vxiaochenmsft_0-1634180313892.png

Add a button control and set its onselect property to:

ClearCollect(Col,{Id:"",Value:IMG_20210111_094015,AbsoluteUri:"",DisplayName:"IMG_20210111_094015.png"})

 

Set the attament control's properties like this:

vxiaochenmsft_1-1634180374926.png

 

vxiaochenmsft_2-1634180413076.png

 

Best Regards,

Wearsky

@v-xiaochen-msftThanks a lot for your help!

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (3,417)