Hi Everyone,
I have a textbox and getting the data (multiple words separated by comma) from other fields into it.
Now, I need to restrict the textbox by showing only first 10 characters by removing the remaining characters and also need to remove the word/characters which are coming in middle of 10th character.
So I have written the below query to achieve the same in SQL and it is working fine in SQL.
DECLARE @row varchar(50)
DECLARE @10Char varchar(50)
SET @row = 'OPI,Rock,Template'
Set @10Char = left ((@row), 11)
SELECT substring(@10Char,len(Left((@10Char),1)),LEN(@10Char)-CHARINDEX(',',REVERSE(@10Char)))
Output: OPI,Rock
(Here the 10th character is coming in-between the word ‘template’, So it removed the completed word ‘template’ after ‘,’)
I tried to apply the same formula in InfoPath, but I didn’t find the REVERSE or CHARINDEX functions present in InfoPath 2010.
Please let me know how we can achieve the above functionality using Rules and functions (Codeless) at the earliest as possible.
Thanks in advance.
Chakradhar.