cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DHAGZ
Helper III
Helper III

Attachment

Good Day!
Asking for help regarding Attachments

 

ATTACHMENT.gif

 

I have LABEL and ATTACHMENT

MaxAttachment required : 1

 

LABEL : remv

Attachment Control :
ITEM : LookUp (minutes,ID = ThisItem.ID).Attachments
OnRemovedFile : Set(remv,"removed")
OnUndoRemovedFile : Set(remv,"stay");
MaxAttachments : If(Label50.Text="removed",2,If(Label50.Text="stay",1))

What I'm trying to do is 

When I delete the attachment, MaxAttachement will add a value of +1 and I can add another file.
then when I undo the file the unsaved file will be deleted and MaxAttachement will - 1.

is this possible?


thanks and advance

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @DHAGZ ,

 

I did a demo for you.

Set your attachemts control's Items prroperty to:

ThisItem.Attachments

 

Set your default property of your attachemts control to:

First(ThisItem.Attachments)

 

Set MaxAttachments:

A

 

Set OnRemoveFile:

Set(A,2)

// A is the MaxAttachments

 

Set OnUndoRemoveFile:

Reset(DataCardValue3);Set(A,1)

// DataCardValue3 is the attachments control's name.

 

The result is as follows:

AAA.gif

 

Best Regards,

Wearsky

 

View solution in original post

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

Hi @DHAGZ ,

 

I did a demo for you.

Set your attachemts control's Items prroperty to:

ThisItem.Attachments

 

Set your default property of your attachemts control to:

First(ThisItem.Attachments)

 

Set MaxAttachments:

A

 

Set OnRemoveFile:

Set(A,2)

// A is the MaxAttachments

 

Set OnUndoRemoveFile:

Reset(DataCardValue3);Set(A,1)

// DataCardValue3 is the attachments control's name.

 

The result is as follows:

AAA.gif

 

Best Regards,

Wearsky

 

View solution in original post

DHAGZ
Helper III
Helper III

Thank you @v-xiaochen-msft :).

Keep helping and Stay safe always 🙂

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,984)