cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rizwanmgm
Frequent Visitor

Text Input Validation

Dear Experts,

 

I have a text input field which will be visible on radio button option and working fine.

on button select i want to check if the text input is blank only when visible.

i try the following code

IsBlank(If(txtRadiations.Visible=true And IsBlank(txtRadiations.Text),true,false))

not working.

please help

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @rizwanmgm please try  And(txtRadiations.Visible,!IsBlank(txtRadiations.Text))

No need for the if statement, if one is false the And function will return false, if noth are true it will return true.

Hope this helps

 

View solution in original post

5 REPLIES 5
rubin_boer
Super User
Super User

hi @rizwanmgm please try  And(txtRadiations.Visible,!IsBlank(txtRadiations.Text))

No need for the if statement, if one is false the And function will return false, if noth are true it will return true.

Hope this helps

 

View solution in original post

Hi,

Thanks for suggestion, i try but still not work, please see the below code for button display mode:

If(IsBlank(cmbApprover.Selected.DisplayName) Or IsBlank(txtProjectName.Text) Or IsBlank(txtProjectNumber.Text) Or IsBlank(txtArea.Text)
Or IsBlank(txtTotalSamples.Text) Or IsBlank(txtTypes.Text) Or IsBlank(rdoSamples.Selected.Value) Or IsBlank(rdoRadiations.Selected.Value) Or IsBlank(And(txtRadiations.Visible,!IsBlank(txtRadiations.Text))),DisplayMode.Disabled,DisplayMode.Edit)

mdevaney
Super User
Super User

@rizwanmgm 
Try this...

txtRadiations.Visible=true And IsBlank(txtRadiations.Text)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

rubin_boer
Super User
Super User

hi @rizwanmgm 

 

Validation returns false, visible but not empty

rubin_boer_0-1615035788712.png

Validation returns true, visible, and empty

rubin_boer_2-1615035958590.png

 

I noticed a copy and paste error on myside, sorry for that

And(TextInput1.Visible, IsBlank(TextInput1.Text))

 

Hope it helps

 

 

 

Thanks with little change its working

And(txtRadiations.Visible=true And IsBlank(txtRadiations.Text))

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,999)