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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Fetch data from Sharep...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on by 225

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:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @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."

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    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,

  • StuartSmith Profile Picture
    225 on at

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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard