How to pre-fill new fields in a InfoPath form base on the old fields, when I add a fields to a form.
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 10 words from the Description field.
Even though I added field and the logic, the existing form data in SharePoint Database does not get modified.
Edit
@PatrickPitre
Thank you very much for the quick response.
I'm dealing with a web-based InfoPath form (Forms Services). Yes I do have Visual Studio 2008 installed in my computer.
One of the things I need to do is to modify existing web-based InfoPath form, which is to add three more fields to the old one. Once I add the fields I need to make sure those newly added fields are not blank when the user click on the existing form that is already in the Sharepoint. I have to take the first 200 words in the existing field say "Description" and plug it into the new field "SummaryDescription".
What I have done so far:
I added those three new fields to the web-based InfoPath form and published into one the test server. I'm able to view the newly added fields in the existing form.
I'm trying to use the Rule in the InfoPath to help me achieve what I need to do. I check whether or not the newly added fields are blank or not. If it is then take the fields in "SummaryDescription" and add the value of .
This is the code:
concat(
substring((string-length(Description)), 1, ((string-length(Description)) <= 200) * (string-length(Description))),
substring(number(201), 1, (not(string-length(Description))) * number(201))
)
But I'm not able to add the value to the field at all.
This is the screen shot of what I did.
I have tried many different ways. And I'm pretty sure "SummaryDescription" is blank but I just could not get the value to display
What do I mean by "Sharepoint Database"? I thought that everything in the web-based InfoPath form is store in some kind of Database. Correct me if I'm wrong.
Thank you very much.