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 / Fetch data from Sharep...
Power Apps
Unanswered

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,989 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
    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

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