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
Solved! Go to Solution.
You can use below message to get message column from your SP list
LookUp(UsersMessageListName, User().Email = UserColumn.Email && Today() > StartDateColumn && Today() < ExpiryDateColumn, MessageColumn)
You can use below message to get message column from your SP list
LookUp(UsersMessageListName, User().Email = UserColumn.Email && Today() > StartDateColumn && Today() < ExpiryDateColumn, MessageColumn)
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)
User | Count |
---|---|
250 | |
105 | |
82 | |
51 | |
43 |