Hi All, How to limit variable characters while printing to message box please? i am testing rest api and i am printing response in mssagebox using a string variable? seeking your expertise?
If the variable type is string,then try by using string maniplations.
Example:
Hope it helps!!
Hi @Sathish_Ashokan ,
responseLimited = If(responseString.Length > 100, responseString.Substring(0, 100), responseString)
- Use an Assign activity to create a new variable that contains the limited characters.
- This line of code checks if the length of
**responseString**
is greater than 100 characters. If it is, it takes the substring from the start (index 0) up to the 100th character. If the length is less than 100, it keeps the original**responseString**
Thanks,
Vinit Mhatre
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.