Power Community

Power Community

Power Pages: Validate Note Control

https://1.gravatar.com/avatar/464497ec9cdb0250bdbdd163528f8b88ec29d530e8f24abd2c188c2fffd173ae?s=96&d=identicon&r=G

Problem Statement

Sometimes, before submitting the form, you have to verify Note Control to determine if the user has uploaded the document or not.

Solution

You can write following JavaScript code on either Basic Form or Multi Step form

var HasNoteAttachment = $('.note').length;
var HasFileUploaded = $('#AttachFile').val();
if(HasNoteAttachment == 0 && HasFileUploaded == "")
{
    alert('Please upload document before proceed');
    return false;
}

Demo

To demonstrate, I have added a File Upload control to the Multi Step form. When I click Next to move on to the next step, I receive the alert message that is seen in the figure below.

This post was originally published on this site

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement - Advertisement

Latest News

5 Benefits of In-App Notifications for Microsoft Dynamics 365 CRM users

For a successful sales process, you need to stay up-to-date with crucial sales information like deal closures, opportunities won,...

More Articles Like This

- Advertisement -spot_img