web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Show messages in Label...
Power Apps
Answered

Show messages in Label only if employees submit their answers

(0) ShareShare
ReportReport
Posted on by 231

I have in the Main screen a label the status change based on their answers submitted. However I on the last screen where they submit there answer they click on a button that submit their answers to the SharePoint. I don't want the employee to know the Result before they submit and click on their office. How I add to the below text not be show the message till they submit.

lolla70_0-1612994442182.png

The Well-check Status Required OnText Code - "Every Box has different Q&A"

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"
)
)

 

On the Submit button - It is actually a Gallery that has all office and every employee click on his office and submit.
So, the OnSelect Code is

ith({_user: User()},

Patch(
'Back to Work Eligibility',
Defaults('Back to Work Eligibility'),
{
Title: "Status from " & _user.FullName & " on " & Text(Today(), ShortDate),
'Check-In Date': Today(),
'Eligibility Status': EmployeeEmail_1,
Result: lblResult_1.Text,
'Working Location': lblWorkingFrom_2.Text,
'Office Location': ThisItem.Title,
'Next Check-In Date': DateAdd(Today(), 1, Days),
Employee: {
Claims: "i:0#.f|membership|" & Lower(_user.Email),
Department: "",
DisplayName: _user.Email,
Email: _user.Email,
JobTitle: "",
Picture: ""
}
}
)
);
Navigate(scrMain, ScreenTransition.Fade);





 

Categories:
  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @lolla70 

    If you put the formula below in your Patch() function, and "vis" in the visible property of your label, and UpdateContext({vis:false}) in the OnVisible property of the screen, then the label should be hidden until the patch successfully executes. (This assumes your Patch() function works)

     

     

    UpdateContext({vis:false});
    With({
     _user: User(), 
     ptch: 
     Patch(
     'Back to Work Eligibility', Defaults('Back to Work Eligibility'),
     {
     Title: "Status from " & _user.FullName & " on " & Text(Today(), ShortDate),
     'Check-In Date': Today(),
     'Eligibility Status': EmployeeEmail_1,
     Result: lblResult_1.Text,
     'Working Location': lblWorkingFrom_2.Text,
     'Office Location': ThisItem.Title,
     'Next Check-In Date': DateAdd(Today(), 1, Days),
     Employee: {
     Claims: "i:0#.f|membership|" & Lower(_user.Email),
     Department: "",
     DisplayName: _user.Email,
     Email: _user.Email,
     JobTitle: "",
     Picture: ""
     }
     }
     )
     },
     ptch
    ); 
    UpdateContext(
     {
     vis:!IsBlank(
     ptch
     ) && IsEmpty(
     Errors(
     'Back to Work Eligibility'
     )
     )
     }
    )

     

     

     

     

  • LA-27081519-0 Profile Picture
    231 on at

    Thank you so much!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard