Tag Info

New answers tagged

0

It can easily be done with InfoPath. Add a unique validation rule for each field and as condition select your dropdown/options field "is equal to" whatever option you like: Add Rule -> New -> Validation. So instead of validating anything in SharePoint, you just validate in InfoPath.


0

(Assuming that you can edit an edit form or new form of a list or library) You will need to customize the form by using SharePoint Designer. Additionaly you'll need to add some Javascript that will contain the logic of the required fields.


3

Try to use validation settings for that - something like =IF(Num1+Num2+Num3<=100,"OK","Not OK") should totally work and will prevent the user from saving. Here's some reference for the formulas - ...


0

You can write Calculated Formulas to do Column Validation; the result needs to be a TRUE or FALSE value For example: =UPPER([column])=[column] Returns true when the entry is all Uppercase =AND( UPPER([column])=[column] , NOT(FIND(" ",[column])) ) returns FALSE if the entry contains a space as well All (Excel like) Functions you can use in ...


0

Add the following formula in column settings -> column validation: =(MONTH(ColName)=MonthNo) and give a custom validation message. For eg: for August, this will be (Month(ColName)=8).


1

You can use the PreSave() function in the newform.aspx. <script type="text/javascript"> var $j = jQuery.noConflict(); function PreSaveAction() { var dataValue= $j(":input[title='YourDataField']").val(); if(dataValue == yourValue){ return true; } return false; } </script> You can save the configurable value to a ...


1

Use PreSaveAction() function PreSaveAction() { var MyNumber = $('input[title="My Number"]').val(); if( MyNumber == 0 ) { return false; //dont save } return true; //save } http://social.technet.microsoft.com/wiki/contents/articles/31330.sharepoint-using-presaveaction-function-on-custom-list-forms.aspx


1

You can do something like this: function click(){ flag = formValidation(); // call function first to return values if(flag == 1){ alert('Your new request has been submitted successfully'); }else{ // some alert } } function formValidation(){ // validate fields here // something like if(val == ''){ ...


0

Wrap your validation code in a function, as well as your 'success message' code in a different function. Have the first function call the second function if all fields are valid. OnClick, call the first function, which will validate the fields and display to the end user which fields are in error. If no fields are in error, the code will call the second ...


1

Expanding on @Naveen's answer, for making the user only enter 5 digits you can enter this formula in column validation: =AND(Column>10000,Column<99999). You can then enter a custom message for that. Replace Column with your column name. As for the 2nd part of your question, since it's a number field it won't let you enter commas or wildcard entries.


1

You can use input mask on that number field. Below is the script: <script language="javascript" src="http://code.jquery.com/jquery-1.4.2.min.js" type="text/javascript" ></script> <script language="javascript" src="http://jquery-joshbush.googlecode.com/files/jquery.maskedinput-1.2.2.min.js" type="text/javascript" ></script> ...


0

Go to "List Settings". Click on your Number field. Under "Additional Column Settings" specify the minimum and maximum values as 10000 and 99999 respectively. With respect to comma, SharePoint puts a comma where appropriate. So a number 43000 would be displayed as 43,000. As for wildcard characters as it is a Number field it won't allow them to be save to ...


0

You don't need to put any validations formula just define the lowest i.e 10000 and highest 99999 number. It will automatically restrict the special character in the field. Done!!



Top 50 recent answers are included