Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Fetch data from Sharepoint list and display in a form datacard.

(0) ShareShare
ReportReport
Posted on by 207

I have a form where we submit a daily summary of work carried out on the "Previous Day" and planned work for "Today".  This data is them submitted to a sharepoint list.  Currently, when populating the "Previous Day" field, we have to remember what we done, but is there a way so that the details submitted in the 7th July "Allan (Today)" field can be displayed in the 8th July "Allan (Previous Day) field. 

 

So when I  go to complete a new form, say for the 8th July, I would select the 8th July from the date picker on the form, it will look at the "Allan (Today) cell for the 7th July row in the sharepoint list and automatically display the details found in that cell in the "Allan (Previous Day)" datacard on the form. (I hope that makes sense).  Is this even possible?

 

1.png       2.png 

 

Thanks in advance,

 

Categories:
  • StuartSmith Profile Picture
    207 on at
    Re: Fetch data from Sharepoint list and display in a form datacard.

    Thanks @v-yutliu-msft @mdevaney for the joint effort and works great. 👍

  • Verified answer
    v-yutliu-msft Profile Picture
    on at
    Re: Fetch data from Sharepoint list and display in a form datacard.

    Hi @StuartSmith ,

    I agree with @mdevaney's most of view.

    But I think you need to make a little change.

    Do you want the "Allan (Previous Day)" field display last day's "Allan (Today) after you select date for the new record?

    If so, then you need to use the action of selecting  date for the new record as the trigger of displaying "Allan (Previous Day)" field.

    What's more, you should use DateAdd function to calculate for date, it's not supported to use "-1" directly for date.

    Try to set like this:
    1)set the datepicker's OnSelect:

    Set(var,true)

    2)set Allan (Previous Day) datacard's Default:

    If(var,
    LookUp(your_datasource_name, Date = DateAdd(DatePicker_Date.SelectedDate,- 1,Days), 'Allan (Previous Day)') 
    )

     

     

    Best regards,

  • Verified answer
    mdevaney Profile Picture
    29,987 Super User 2025 Season 1 on at
    Re: Fetch data from Sharepoint list and display in a form datacard.

    @StuartSmith 
    You could do this by changing the Default property of Data card for the Allan (Previous Day) field.

    LookUp(your_datasource_name, Date = DatePicker_Date.SelectedDate - 1, 'Allan (Previous Day)') 


    My assumption is the previous date only appears once in the Date column of your datasource (which makes it unique).

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard