title: How to set a complicate rules in InfoPath?
body: <p>In my SharePoint server I have an existing InfoPath form that contains data. I would like to add three new fields in the existing InfoPath and I want to make sure those newly add fields are not empty. If the fields are empty I would read the existing fields and stick the first 200 words in the new fields. </p>
  
  <p>Right now I'm able to add three new fields and update those fields in my Sharepoint. I know that I need to set rules to the new fields. But the problem I have is to add rule so that I can take the first 200 words from existing information. </p>
  
  <p>This is what I can do so far (Assuming the existing information's string length is more than 200 words) but I'm not too sure how to check if the string length is less than that: </p>
  
  <p>First I check if the new field "SummaryDescription" is empty, if it is then I set the rule to take the first 200 words from "Description" and apply it to "SummaryDescription"</p>
  
  <pre><code>substring(Description, 0, 201)
  </code></pre>
  
  <p>Do I have to do this in the code or I can do it in InfoPath? Am I doing this the right way?  </p>