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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (5,011)