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 / "Skip to main content"...
Power Apps
Answered

"Skip to main content" instead of User Message

(0) ShareShare
ReportReport
Posted on by 209

Hello,

I am using the Validation settings option for a column in my SharePoint list. I essentially have the column "Name of VP" conditionally required in my custom form based on if the "Over 500" column is true. Here's that formula:

 

val-settings.jpg

 

The validation seems to be working, as the form does not Save with the "Name of VP" being blank, but instead of displaying the User Message I entered in Validation Settings ("A VP selection is required."), I am shown this "Skip to main content" message in blue on top... Why would that be? 

 

skip-to-main-content.jpg

 

 

 

Thank you in advance,

M

Categories:
I have the same question (0)
  • Morghan Profile Picture
    209 on at

    Something to add that I just noticed - if I tab to this "Skip to main content," I am seeing javascript:void(0) in the bottom right corner: 

     

    js-void.jpg

     

     

    Is there a way to 'turn this off'?

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    @Morghan,

     

    It seems you are using PowerApps custom form, and the Validate message is not available for PowerApps custom form.

    You can set the validation and message in PowerApps. Please check:

    1. Set the OnSave property of SharePointIntegration, add an if condition before patch function.

     

    If(Over500Toggle.Value && IsBlank(NameOfVPDataCardValue.Selected.Value),Set(Vartext,"Required"),Patch(...);ResetForm(SharePointForm1); RequestHide())

     

    2. Set ErrorMessage of NameOfVPDataCard:

     

    If(!IsBlank(Vartext),Vartext,Parent.Error)

     

    Then if the toggle is selected, but the VP is not selected, the save button won't work, and show the error message.

    Sik

  • Morghan Profile Picture
    209 on at

    Hi @v-siky-msft - thank you for the quick reply! I am not familiar with patch functions so I've watched some tutorials on how it's used so I coupld apply it here but am not seeing how it'd be used in this OnSave formula. Right now, I am getting character errors probably due to me not knowing what would be used after "Patch." I've updated the name of my cards to "over500" and "NameOfVP" and updated the ResetForm to reflect my "CreateItemForm" (instead of SharePointForm1, assuming that just points at the specific form I am concerned with).  What am I doing wrong?

     

    2020-01-17_9-48-00.jpg

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    @Morghan 

    sorry for my bad, the patch function is just the original one. Please check the following code:

     

    If(Over500Toggle.Value && IsBlank(NameOfVPDataCardValue.Selected.Value),Set(Vartext,"Required"),Patch('TAA Requests',If(CreateItemForm.Mode=FormMode.Edit,SharePointIntegration.Selected,CreateItemForm.Mode=FormMode.New,Defaults('TAA Requests'),CreateItemForm.Updates);ResetForm(CreateItemForm); RequestHide())

     

    Note: Over500Toggle is the Toggle name in Over500 data card, NameOfVPDataCardValue is the combo box name in Name

    Sik

  • Morghan Profile Picture
    209 on at

    Hi @v-siky-msft - I have renamed the Toggle and combo box accordingly but when entering that code into OnSave in SharePointIntegration, I am receiving error: "Invalid Argument Type (Boolean). Expecting a Record value instead." I can't tell where it's looking for the else_if: 

     

    2020-01-21_15-56-58.jpg

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    @Morghan,

     

    Is there anything wrong with Data source name ( 'TAA Requests') and EditForm name(CreateItemForm)?

    According to the screenshots you posted, there are seemly three Forms in the app. Could you share more details?

    Oh, that could be my bad, I miss a ")" after "Defaults('TAA Requests')".

    Could you try this:

     

    If(Over500Toggle.Value && IsBlank(NameOfVPDataCardValue.Selected.Value),Set(Vartext,"Required"),Patch('TAA Requests',If(CreateItemForm.Mode=FormMode.Edit,SharePointIntegration.Selected,CreateItemForm.Mode=FormMode.New,Defaults('TAA Requests')),CreateItemForm.Updates);ResetForm(CreateItemForm); RequestHide())

     

    If this still doesn't work, please share more details with your app.

    Sik

  • Morghan Profile Picture
    209 on at

    Hi @v-siky-msft  - excellent, thank you!! I didn't end up setting ErrorMessage of NameOfVPDataCard because I added a custom label showing "REQUIRED" above that field anyways (there is a rule set on it to only show NameOfVPDataCard when Over500Toggle is true), but when using the code you provided for OnSave, I am now experiencing a much cleaner experience when trying to Save the form without choosing a VP from the choice box. Before, it would show that awful "Skip to main content" text. Now, nothing happens when hitting Save, which works great!! Thank you again for your help

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard