web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Adding attachments to ...
Power Apps
Unanswered

Adding attachments to leave request template new request screen

(0) ShareShare
ReportReport
Posted on by 67

Hey there, 

 

I'm editing the leave request template and I'm trying to add attachments to the new request screen, I added the attachments field in my sharepoint list which stores the data and added the form card next to the details field. Usually on other apps it's just as simple as adding the form card.

Universal_Power_0-1710520866503.png

I also added on the onvisible screen the "attachments" variable and added it on the default section. 

Universal_Power_1-1710520992201.png

Perhaps I am going about this the wrong way? When I run the app preview I just say it say no item to display, advice ?

 

Categories:
I have the same question (0)
  • RogierE Profile Picture
    875 Moderator on at

    If you select the error, what does it say?

  • Universal_Power Profile Picture
    67 on at

    Hi, @RogierE  it says expected record value, not sure how I'd change it from a text to a record value as it's here 

    Universal_Power_0-1710768552852.pngUniversal_Power_1-1710768563222.png

     

  • Verified answer
    RogierE Profile Picture
    875 Moderator on at

    As you're stating Set(_attachments,""), you're indeed creating a text value. A record is set by using Set(_record,{column1:"",Column2:""}), but you don't need to set an empty default value to all of your Form fields. Just leave them standard. e.g. Default = Thisitem.Attachments for the attachment datacard. 

     

    Now what you need to do to get away from the "nothing to display" message is something different. 

    A Form has 2 properties that you need to fill in order to show or edit records:

    1. The DataSource: this is the full list that you are manipulating
    2. The Item: a specific record that you would want to manipulate with your Form. 

    I guess you get the message because you forgot to fill in the second property. Typical things to fill in there would be for example First(List1) if you want to manipulate the fist record in List1  or I guess in your case Defaults(List1) to add a new record to your list and edit that. As this is a new record, you don't need to default the fields in the form to empty  and you do not need to reset the fields in the Form 🙂 

     

    Please like the reply and/or accept it as the solution if the answer is what you were looking for.

     

     

  • Universal_Power Profile Picture
    67 on at

    Thank you so much @RogierE ! I tried what you suggested and I was able to successfully set the data type to record, but I believe I may be assigning it in the wrong place, I set the record as _attachments and I'm putting that into the items property of the data card value, is that the right place to put the record?  (on the default of the data card itself I left it as "ThisItem.Column1" as you said)

  • RogierE Profile Picture
    875 Moderator on at

    Nice that you learnt how to create a record. That might come in handy some other time. 🤣

    As said, you do not want to fill the defaults of all the fields in your forms with empty strings or records, you simply need to let the Form start on a blank new record. 
    As said, if you would place Defaults(List1) in the Items property of your Form, that would be all you need. 

    Please like the reply and/or accept it as the solution if the answer is what you were looking for.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard