Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Powerapps - error message handling

(0) ShareShare
ReportReport
Posted on by 32

Hi, how can i add error message with the condition below:

 

1) Upon clicking "+" icon,

  • If Person field did not selected, display error message (border color = red)
  • If Text Box field is blank, display error message (border color = red) Upon clicking Submit button,

2) Upon clicking Submit button,

  • If Data Table is blank (no record), display error message (border color = red)

JSJS_0-1668578775198.png

Thank you!!

Categories:
  • AnthonyD Profile Picture
    AnthonyD 559 on at
    Re: Powerapps - error message handling

    @JS-JS 

    On the + icon. Set the following formula:
    If(!Isblank(Textinput.Text) And !IsBlank(comboBox.selectedItems), <Do your patch to datatable>;Set(varValidateAddInput,false),Set(varValidateAddInput,true))

    Then on your text input controls bordercolor add the following formula If(Isblank(Self.Text) And varValidateAddInput,Red,Gray)

    On comboBox/dropdown input controls add the following formula If(Isblank(Self.SelecectedItems) And varValidateAddInput,Red,Gray)

    On your submit button you could just do. If(IsEmpty(<Datasource from datatable>),Set(varValidateSubmit,true),<Patch changes>;Set(varValidateSubmit,false))

    on the error message beneath datatable set its visibility to:
    varValidateSubmit

    Do the same thing for the bordercolor of datatable as you did for input controls with varValidateSubmit variable
    If this helped you resolved your answer please mark this answers as a solution.

    Best Regards,

    Anthony

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard