cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Greg68
Helper II
Helper II

Display message from a SharePoint list, based on the user of the app

Hello everyone,

 

In a canvas app, I want to display a text from a SharePoint list, based on the user who is using the app.

 

The message that I want to display, is stored in a SharePoint list that has a user column and message multiple text column and a start date and expiry date column for this message.

 

So I can add the message in the SharePoint list for this particular user to show on his end in the app.

 

As for the start and expiry date of the message, the purpose is to display the message to the user based on the start date and when it reaches the expiry date it disappears and displays another message from a different row that has different dates.

 

I'm trying but the whole system and approach needs a suggestion from an experienced users, if any would like to help, I do really appreciate it.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
NandiniBhagya20
Solution Sage
Solution Sage

You can use below message to get message column from your SP list

LookUp(UsersMessageListName, User().Email = UserColumn.Email && Today() > StartDateColumn && Today() < ExpiryDateColumn, MessageColumn)


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

3 REPLIES 3
NandiniBhagya20
Solution Sage
Solution Sage

You can use below message to get message column from your SP list

LookUp(UsersMessageListName, User().Email = UserColumn.Email && Today() > StartDateColumn && Today() < ExpiryDateColumn, MessageColumn)


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
Greg68
Helper II
Helper II

Thank you @NandiniBhagya20  this works, I have one issue regrinding the start date, if I set the date of today in the start_Date, the message won't show up in the app, if I change the date to the previous day, the message shows up, I'm not sure if it is a SharePoint List server time issue or not?

Any Idea?

Thanks

Yes as we are comparing it like this : Today() > StartDateColumn

Today should be less than startdate

We can modify this part so that it will also consider today's date
DateAdd(Today(), -1, Days) > StartDateColumn

 

LookUp(UsersMessageListName, User().Email = UserColumn.Email &&DateAdd(Today(), -1, Days) > StartDateColumn && Today() < ExpiryDateColumn, MessageColumn)


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (2,638)