cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NigelP
Super User
Super User

Is it possible within PowerApps to launch an attachment without having a form

Hi 

 

Is it possible to be be able to launch a an attachment without being in a form ?

 

So rather than ThisItem.{Attachments}.AbosluteUrl cannot I :-

Set(ListId,Lookup(<listname>, title=varGUID));

Launch(ListId.{Attachments}.AbsoluteUrl)

 

That way I can check to see if there is an attachment without the hassle of having a form.

 

Having 3 or 4 of these forms on the screen is a nightmare getting them lined up and not overlapping each other.

 

Better to get the ListIDs of the forms and then having a OnSelect event of a text or html box that has the Launch command on  it.

Also would not be getting the dreaded "Getting Your Data" message if did not use the form and there was not an attachment.

 

Thanks

 

Nigel

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @NigelP ,

 

Could you tell me:

Do you want to use a combo box control to display all attachments?

When using combo box control to select an attachment, do you want to press the button to open it?

 

If my assumptions are correct, please try the formula below:

 

1\ Add a button control and set its onselect property to:

ClearCollect(Test,0);ClearCollect(Test2,Filter(Ungroup(ForAll(Sequence(CountRows(your list name)),Collect(Test,Last(Test).Value+1);Last(FirstN(your list name,Last(Test).Value)).Attachments),"Value"),!IsBlank(Id)))

 

2\ Add a combo box control 'ComboBox1' and set its Items property to:

Test2

 

3\ Add a button control and set its onselect property to:

Launch(ComboBox1.Selected.AbsoluteUri)

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

Hi @NigelP ,

 

Could you tell me:

Do you want to use a combo box control to display all attachments?

When using combo box control to select an attachment, do you want to press the button to open it?

 

If my assumptions are correct, please try the formula below:

 

1\ Add a button control and set its onselect property to:

ClearCollect(Test,0);ClearCollect(Test2,Filter(Ungroup(ForAll(Sequence(CountRows(your list name)),Collect(Test,Last(Test).Value+1);Last(FirstN(your list name,Last(Test).Value)).Attachments),"Value"),!IsBlank(Id)))

 

2\ Add a combo box control 'ComboBox1' and set its Items property to:

Test2

 

3\ Add a button control and set its onselect property to:

Launch(ComboBox1.Selected.AbsoluteUri)

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. 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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (4,041)