cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
3csman
Impactful Individual
Impactful Individual

Enforce 'Sentence Case'

How do I enforce 'Sentence Case' in a form datacard?

 

This is what could be used in a Label or Text Input.

 

     Proper(Source.Text)

 

Where would the above go in a datacard field to enforce 'Sentence Case' data entry?

25 REPLIES 25
3csman
Impactful Individual
Impactful Individual

Field Validating:

Card: MemberEmail;

Data Card: UpdateFormMemberEmailFld

 

Validation Toggle Name: EditMemberProfileValidationToggle

RandyHayes
Super User III
Super User III

@3csman 

So, normally you would have the accounting of the IsBlank in your toggle validator.

So, in that Default formula of the toggle, something like : 

   !(IsBlank(TextInputControlFromDataCard.Text) || IsMatch(TextInputControlFromDataCard.Text, Email))

This will be true if the textinput has something in it and it is not a valid email.

It will be false if the textinput is blank (matching to email is irrelevant at that point) 

 

Then, your BorderColor can be based off of that formula as well.

If( !(IsBlank(TextInputControlFromDataCard.Text) || IsMatch(TextInputControlFromDataCard.Text, Email)), Red, Black)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

3csman
Impactful Individual
Impactful Individual

Is 'Match.Any' the right choice here? I don't get errors, but I'm not sure it correct.

 

If( !(IsBlank(UpdateFormUnqIDFld.Text) || IsMatch(UpdateFormUnqIDFld.Text, Match.Any)), Red,Black)

 

Data Card (UpdateFormUnqIDFld) Text Input field in a Form.

3csman_0-1613677856488.png

 

RandyHayes
Super User III
Super User III

@3csman 

No, before you were validating an Email, what kind of validation are you trying to do on this text input?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
3csman
Impactful Individual
Impactful Individual

I understand.

 

Here is what is in the toggle for the field.

 

    IsMatch(UpdateFormUnqIDFld.Text, "[A-Z]{2}[0-9]{4}")))

 

The field now has the following in it; does this work?

 

     If( !(IsBlank(UpdateFormUnqIDFld.Text) || IsMatch(UpdateFormUnqIDFld.Text, "[A-Z]{2}[0-9]{4}")), Red,Black)

RandyHayes
Super User III
Super User III

@3csman 

Yes, that should work.  Is it working as you want?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (62,998)