cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lolla70
Helper IV
Helper IV

Date formula is not working

Hi All

 

I created a Sharepoint List that include "Check In Date" and "Next Check In Date"

 

I have a button in the App on "TEXT" I wrote 

If(IsBlank(LookUp('Back to Work Eligibility', Employee.Email=VarUserEmail)),
"Check in Required",
"Next Check-In Date " & Text(DateTimeValue(Text(First('Back to Work Eligibility'). 'Next Check-In Date' )), "[$-en-US]mm/dd/yyyy"))

 

On other button the Patch

Patch(
'Back to Work Eligibility',
Defaults('Back to Work Eligibility'),
{
Title: "Status from " & User().FullName & " on " & Now(),
'Check-In Date': Now(),
'Eligibility Status': EmployeeEmail,
Result: lblResult.Text,
'POC Name': ThisItem.'Employee Name'.DisplayName,
'Next Check-In Date': DateAdd(
Now(),
Value(varCheckInDays),
Days
),

 

The button is not updated the Next Date Button on the APP

When I change the formula to "Last" instead of First it works but then all my colors change to black. Cause I need to get the last Next Check - In Date. In the SharePoint it works but it is not updating in the App????

If(IsBlank(LookUp('Back to Work Eligibility', Employee.Email=VarUserEmail)),
"Check in Required",
"Next Check-In Date " & Text(DateTimeValue(Text(Last('Back to Work Eligibility'). 'Next Check-In Date' )), "[$-en-US]mm/dd/yyyy"))

 

 

Any idea??

On other button the Patch

33 REPLIES 33
lolla70
Helper IV
Helper IV

the lblResult_1 OnText Code :

If(
IsBlank(ListBox3_1.Selected.Value),
"Well-check Status Required",
If(
ListBox3_1.Selected.Value = "Home",
"Work from Home",
ListBox4_1.Selected.Value = "Yes",
"Work from Home, contact HR",
ListBox5_1.Selected.Value = "Yes",
"Work from Home, contact HR",
ListBox5_2.Selected.Value = "Yes",
"Work from Home, contact HR",
ListBox5_2.Selected.Value = "No",
"Clear for Office/Field work"
)
)

Thank you so much, It worked. First time it didn't then I deleted everything save and refreshed then paste again and it worked. This exactly what I want. I will try now to publish and test again.

When I check in and close the App the Result doesn't stay in the screen when I open the APP I again. It should stay till next day same as the Check Date . I added Date Add(Today(), 1, Days)" to the code below and it didn't work.

 

the lblResult_1 On Text Code :

If(
Is Blank(ListBox3_1.Selected.Value),
"Well-check Status Required",
If(
ListBox3_1.Selected.Value = "Home",
"Work from Home",
ListBox4_1.Selected.Value = "Yes",
"Work from Home, contact HR",
ListBox5_1.Selected.Value = "Yes",
"Work from Home, contact HR",
ListBox5_2.Selected.Value = "Yes",
"Work from Home, contact HR",
ListBox5_2.Selected.Value = "No",
"Clear for Office/Field work"
)
)

 

Hi @RandyHayes 

I really need your help, I gave up

The Next Check-In stopped working when the result is Work from home

The 

lolla70_0-1614226924549.png

The OnText Code

With({_email: User().Email},

"Next Check-In Date " &

If(lblResult_1.Text = "Work from Home",
DateAdd(Today(), 1, Days),
If(!LookUp('Back to Work Eligibility', StartsWith(Employee.Email,_email),true),
"Check in Required",
With({_records: SortByColumns(Filter('Back to Work Eligibility',StartsWith(Employee.Email,_email)), "NextCheck_x002d_InDate", Descending)},
Text(
With({_utc: First(_records).'Next Check-In Date'},
DateAdd(_utc, TimeZoneOffset(_utc), Minutes)
),
ShortDate
)
)
)
)
)

 

When I logged out and log in to the APP I should see the Result Message and the Date till next day, however it is showing to start from beginning. How I fix this issue?

lolla70_1-1614226973657.png

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,198)