Validate SharePoint Text Box to Limit Number of Words - validation

I am trying to use validation for the text bos on the SharePoint Add New form to limit number of words entered into the field. Unfortunately solution I have found on stack overflow does not work for me. I have entered
string-length(Status) - string-length(translate(Status, " ", "")) < 10
into validation rule, Status is the name of the text field I want to limit / validate. When I run rule inspector it is showing Invalid Field in red in the Validation area. The rule is not working, is displaying red warning, does not matter what I enter into the field and I cannot save entered data.. What I am doing wrong? What I have to do to have it working ???
Thanks for help.

I have received correct answer Microsoft Developers Network from Sathiya Kamalanathan. The valication which works is:
string-length(.) - string-length(translate(., " ", "")) > 10
I hope it will help others to solve similar problems.

Related

Power Automate: Create_Item Failed

I am trying to create an intake process where where a response from a Microsoft Form creates an item into our SharePoint queue for my team to work. This workflow has some branching so some questions may not always need answers. When the "Date of Change" field is used as intended in the workflow by the user, everything works correctly and appears in our queue. When the user goes down a path where the "Date of Change" field is not needed or a part of the workflow, I receive the below error and the results are never pushed to our queue.
Error Message:
The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/DateofChange' is required to be of type 'String/date'. The runtime value '""' to be converted doesn't have the expected format 'String/date'.
Workflow Images:
To fix this I have tried making the field "Not required" in hopes that if left blank it would not get read by the flow.
I have also tried, changing the format of the column from Date and time to Single Line of Text and neither of those have worked.
Try an expression instead of the dynamic content field. In this expression check for empty with the empty function. If it is empty use the null value.
Below is an example
Make sure you change the question id to your question id in the expression.
if(empty(outputs('Get_response_details')?['body/rec7e8e58aab84f49a27cacc460a7eeaf']), null, outputs('Get_response_details')?['body/rec7e8e58aab84f49a27cacc460a7eeaf'])

Netsuite Print Templates Decimals cutting off after 3

I am trying to print out a custom Decimal Number field on a sublist from a Purchase Order. The print template is only giving me 3 decimals even when I have more then three. For example 10.12345678 will print as 10.123. I am doing zero formatting so it's nothing I'm doing from within the FTL file.
Anyone ran into this issue before?
Ok I figured it out. When the field was created someone checked the "Apply Formatting" Checkbox.

WebEdit and List Combo field Automation using UFT

Hi I am trying to Automate the input field for searching the equity on the website "https://www.nseindia.com/" using UFT. I am able to set value in the WebEdit field but I am not able to submit using UFT
Below is the descriptive code :
Set Obrowser = Browser("name:=NSE - National Stock Exchange of India Ltd\.")
Set oPage = Obrowser.Page("title:=NSE - National Stock Exchange of India Ltd\.")
oPage.WebList("html id:=QuoteSearch").Select "Equity"
oPage.WebEdit("name:=companyED","index:=0").Set "SBIN"
oPage.WebEdit("name:=companyED","index:=0").Submit
enter code here
Image of the field which is highlighted
Could you please help me in handling this type of input box which is shown in screenshot
I see that when you set a value in the search field we get a list of matching results. If you click on the appropriate result the search is performed.
Instead of submit try the following:
oPage.WebElement("html id:=ajax_response").Link("text:=.*SBIN.*").Click
This assumes there is only one match (you can fine-tune it if there are more).
Explanation:
We first look for the list of results that fit the search term (this is in a SPAN with id=ajax_response). Then, under that, we look for the Link that we want to click on. In this case there's only one match so the description doesn't really matter.

How to limit the characters in input field in crystal report

I am using crystal report 2008, i have a report and that has a input field called "Departure_no".
In this input field we can type maximum of four departure_no (Eg: 2345,234,2345,23456), if it exceeds this limit(more than 4 numbers-can count with 3 commas(,)), this input field should not allow to type further.
Is there any way to achieve this by formula or something else by crystal report??
Thanks in advance!!
Priya
try below
use alerts to show the message: I am showing on a database field
Go to Report--> Alert --> Create or modify alert
When a window is opened provide the following:
required name
Required message
Condtion when alert need to be displayed
You can give condition as
if Length(databasefield)> 4 //you need only 4 chars hence this condition
then true
else false
Click ok.
Now you will get message
Let me know of you are looking for something different

How to validate an optional empty textbox, Is the data valid or not - its optional... -

Today I asked myself how can I handle user input if the user have not to enter it...
A firstname and lastname is all he must enter. The adress he needs not to fill out.
Now I have to decide, is the missing data a user mistake or didn`t the user want to enter
data?
How can I deal with such a scenario?
If the address field is perfectly valid when blank (i.e. "") then I would first do a check against the length of the data within the address text field.
If the length of the data is > 0 then the validation routine should take place, else the form should continue to process...
If you wanted to get slightly more intelligent with this (and depending on your requirements) you could perhaps put some code in place to check whether the user has entered the address box with their cursor at any point and then carry out validation accordingly.

Resources