In my InfoPath form I have a field name called: "Description". Now I added another field called: "SummaryDescription". Which is suppose to take the first 200 words from the Description field.
The rules I wrote for "SummaryDescription" is (this rule will apply only if "SummaryDescription" is blank):
If the length of the "Description" is less than or equal to 200 then it will pull out all the content in "Description" to "SummaryDescription"
Else it will pull out only the first 201 words in "Description" to "SummaryDescription".
This is my code for this:
substring(../my:Description, 0, (((string-length(../my:Description)) | number(201))[(((string-length(../my:Description))) <= 200) + 1] ))
But I keep getting this kind of error message:
Expression must evaluate to a node-set.
substring(../my:Description, 0, ((-->(string-length(../my:Description))
I'm not too sure how to solve it. I'm I missing something in my code or this is completely wrong.
I would appreciate if anyone can help me with this.
Thank you very much for your help....