
Announcements
I have a SharePoint list, "MyList" with a single column "Title". I would like to change the visibility of a button based on whether the title is currently in the list and the SharePoint created time is within today. The objective is complete the list everyday and only allow one submission per item per day.
The first part of the formula works (If(DataCardValue1.Text exactin MyList.Title,false,true)) but I can not seem to reference the Sharepoint created date field within this context.
Visible: If(DataCardValue1.Text exactin MyList.Title,false,true) && MyList.Created >= Today()
I have also tried If(DataCardValue1.Text exactin MyList.Title,false,true) AND (MyList.Created >= Today()))
Hi @sassyx65,
I don't think the formula would work.
If here you would like to take use of <, > or =with date strings, the type of the two should be the same.
Here MyList.Created >= Today() will not work, as the MyList.Created is not a Valid date string, it is a column.
Could you please share more details about where you would like to put this button?
If the button would be in an Gallery, then the following code should work:
If(ThisItem.Title exactin List.Title && Not(IsToday(ThisItem.Created)),false,true)
Further, if you would like to check if the DataCardValue exists in the items created by today, we could take use of the following way to check:
If(
IsEmpty(
Filter(
Filter(List,IsToday(Created)),
DataCardValue1.Text exactin Title)
),
true,
false)
Regards,
Michael