Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

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:
  • RogierE Profile Picture
    862 Super User 2025 Season 1 on at
    Re: Adding attachments to leave request template new request screen

    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.

  • Universal_Power Profile Picture
    67 on at
    Re: Adding attachments to leave request template new request screen

    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)

  • Verified answer
    RogierE Profile Picture
    862 Super User 2025 Season 1 on at
    Re: Adding attachments to leave request template new request screen

    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
    Re: Adding attachments to leave request template new request screen

    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

     

  • RogierE Profile Picture
    862 Super User 2025 Season 1 on at
    Re: Adding attachments to leave request template new request screen

    If you select the error, what does it say?

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,708 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,030 Most Valuable Professional

Leaderboard