Share via


Split a text based on delimiter and add items to a sharepoint list using SPD workflow

Question

Friday, December 27, 2013 7:21 AM

Hi All

I have to store repeating table data into a sharepoint list. I have developed an approach to store data into a sharepoint list using web services as mentioned at http://www.bizsupportonline.net/infopath4007/how-to-submit-items-rows-repeating-table-infopath-sharepoint-list.htm. However this approach is working when form opened client only but when I opened it in browser this approach is giving error. Now I'm looking to promote repeating table data by combining items will a delimiter semi-colon (;). Please let me know how can I split the promoted field value using de-limiter and add it to a sharepoint list.

Note:

I'm working on SharePoint online 2010. (I don't have sharepoint on-premise, so I can't use SharePoint Object Model)

If anybody know how to deal with this, please let me know.

Thank you in advance.

All replies (3)

Monday, December 30, 2013 7:31 AM âś…Answered

Hi Chuchendra,

According to your description, my understanding is that you want to split the promoted field value in InfoPath form which was combined using semi-colon and add it to a SharePoint list.

I recommend to submit the data to another SharePoint list first(use a column to store the value) and then create calculated columns to user formula to split the value, then use workflow to update the list where you want to add the value with the divided values.

For example: the value is aa;bb;cc;dd.

Based on the number of the semi-colons, we need to create one column to store the original value(named test for example), four calculated columns(v1,v2,v3,v4) to store the divided values and two more calculated columns(flag1,flag2) for use in the formula.

v1: =LEFT([test],FIND(";",[test])-1)

flag1: =RIGHT([test],LEN([test])-FIND(";",[test]))

v2: =LEFT([flag1],FIND(";",[flag1])-1)

flag2: =RIGHT([flag1],LEN([flag1])-FIND(";",[flag1]))

v3: =LEFT([flag2],FIND(";",[flag2])-1)

v4: =RIGHT([flag2],LEN([flag2])-FIND(";",[flag2]))

We can also use Client Object Model to write code to split the value of the field.

You can download the dll files form the link below:

http://www.microsoft.com/en-in/download/details.aspx?id=21786

Best regards.

Thanks

Victoria Xia
TechNet Community Support


Friday, December 27, 2013 8:58 AM

Split part code you will be able to in the custom code on submit action, and save it to SharePoint list. You can also create a page load event custom code to read the data from lists and set to infopath fields

Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
INSQLSERVER.COM Mohammad Nizamuddin


Friday, December 27, 2013 9:16 AM

Hi Mohammad,

Thank you for your reply.

I don't have SharePoint installed in my system. Can you please let me know how can I get SharePoint DLLs in my system without installing SharePoint.

Appreciate your response.

Thanks & Regards

Chuchendra