Skip to main content

Hello,

 

**********

I strongly suggest you review Repeating section as html table

Its easier and more efficient than this.

**********

 

I've been searching alot for something simple to convert or decode the xml that is generated from the repeated section into a plain text.

 

most of the blogs uses UDA and some complex workflows to do that.

 

but i managed to make a simple workflow and some extra controls on Nintex forms to get the text i needed.

 

it may not be the optimal solution for most cases, but for me, its just what i need grin.png

 

as a start, create two list columns type of Multiple lines of text "plain text"

 

Repeated Action.png

 

 

- Create a form using Nintex Forms.

 

- Create the repeated section you need.

 

connected to.png

 

note that all controls inside the repeated section must be "Not connected".

 

only connect the repeated Section to one of the multiple lines column that you created.

 

name the controls inside that repeated section.

 

when publishing the form and creating a new item, you will see the below results in the Repeated Action Column.

 

Repeated Results.png

 

now we want to get the required data in plain text without the tags

 

as a start go to you Nintex form

 

- Add 4 single line textboxes, sort and configure them as demonstrated in the below images.

 

adding 4 textboxes and sorting them as the below image

 

txtboxes names.png

 

note that all the textboxes are not connected to any control

 

i sorted them this way because after testing, the list column is filled from top to bottom

 

first textbox is used to "add new line" and add the field name to it, see the image below.

 

1stboxconfig.png

 

we added the name of the label so the data is displayed properly when converting it to plain text ( you will see the results at the end )

 

do the same step for text box 2 and 3

 

-txtbox2: default value: new line Email / not visible.

-txtbox3: default value: new line Address / not visible.

 

for textbox 4, make its default value a new line only.

 

now Nintex form part is complete.

 

now you have to create a workflow to remove all the tags, its a really simple workflow that i discovered by mistake silly.png

 

- create a variable type of multiple lines of text, lets name it varContent.

 

- add "set variable" action to your workflow and configure it as shown in image.

 

setvar1.png

 

- fill this variable with the field where you saved the repeated section and retrieve it as plain text.

 

- add "set field value" action to your workflow, set the second list column that we created "plain text" with varContent as shown below.

 

setfield.png

 

save and publish your workflow, now you should see the expected results.

 

final.png

 

**Note

 

if you wish to add spaces in the default value of the textboxes, like this (Name: John) instead of (Name:John). add the below workflow action. (before set field value action)

 

plaintextafter.png

 

fn-Replace(variable," ","")

 

  means the "space" in html but the & was rendered as &

 

hope this helps

 

thanks happy.png

Hello Santhea,

i don't think its possible, sorry.

the only way i can think of, to get the display text of the drop down list or lookup is by using a calculated field

BUT the issue in this way is, when you add a new row in repeated section

all the calculated fields value connected to that lookup will change to the selected option


hello Santhea,

i know its too late

i think there was an issue with the calculated field at that time (not sure)

but now when i added a calculated field inside the repeating section and used this formula replace(Lookup,"[0-9]*;#","")

and it gave me the display text of the drop down list

im replacing this [0-9]*;# with null because the output of the drop down is like this 3*;#DisplayText

hope that solves your issue

tell me how it goes.

Ibrahim


Hello Caitlin,

yes, i'm saying to add a calculated field inside your repeating section, and add a replace function in its formula

for example: replace(ddlCountry,"[0-9]*;#","")

where ddlCountry is your lookup control

Thank You
Ibrahim


Hello Caitlin,

can you please post the xml output.

or attach the form and workflow to look into it.

you can hide controls in two methods,

1.  open control settings > Appearance > set visible = No

2. add a formatting rule to that control > type "true" inside the condition textbox > tick the "hide" checkbox

those should hide the controls inside your form.

now if the control is not behaving correctly, make sure you have the latest version of Nintex Forms, if you do have latest version, i suggest you open a ticket with Nintex support.

Thank you
Ibrahim


This was working correctly when I first tested it, however, now the last line break is not working. I get the first section displaying correctly but when I add a second it does not how the new line boxes. Any ideas? The bold below is what is in the second section.


Provider: 2ACC Business.
Product: 4DATA: Cable TV
Bandwidth: 201011
Term: 3 Year
Quote Received: 12/28/2016 00:00:00
Notes: Notes4ADVODA12DATA: Ethernet P2P/PL33533 Year12/23/2016 00:00:00notes 1


Hello Stefanie,

can you please post a screenshot of the repeating section? or the xml form itself?

Thank you

Ibrahim


Here is the form with the repeating section.


Hello Stefanie,

i created a form with the exact controls and layout as yours, but i didn't face the same issue as you did.

can you export the form and send it to me? and the XML output too.

thank you

Ibrahim


Thank you for your help with this. Below is the XML. I will try and send you the form export via message. I can't attach it to my post.

<?xml version="1.0" encoding="utf-8"?><RepeaterData><Version /><Items><Item><Txt-Provider type="System.String"> Provider: </Txt-Provider><Provider type="System.String">6</Provider><Calc-rplProvider type="System.String">AireSpring-CSC</Calc-rplProvider><Txt-Product type="System.String"> Product: </Txt-Product><Product type="System.String">4</Product><Calc-rplProduct type="System.String">DATA: Cable TV</Calc-rplProduct><Txt-bandwidth type="System.String"> Bandwidth: </Txt-bandwidth><Bandwidth type="System.String">20x50</Bandwidth><Txt-MRC type="System.String"> MRC: </Txt-MRC><MRC type="System.Decimal">200</MRC><Txt-NRC type="System.String"> NRC: </Txt-NRC><NRC type="System.Decimal">100</NRC><Txt-Term type="System.String"> Term: </Txt-Term><Term type="System.String">2 Year</Term><Txt-QuoteReceived type="System.String"> Quote Received: </Txt-QuoteReceived><QuoteReceived type="System.DateTime">12/29/2016 00:00:00</QuoteReceived><Txt-Notes type="System.String"> Notes: </Txt-Notes><Quote_x0020_Notes type="System.String">Test notes 1</Quote_x0020_Notes><TextSpace type="System.String"></TextSpace></Item><Item><Txt-Provider type="System.String"></Txt-Provider><Provider type="System.String">15</Provider><Calc-rplProvider type="System.String">Bright House.</Calc-rplProvider><Txt-Product type="System.String"></Txt-Product><Product type="System.String">31</Product><Calc-rplProduct type="System.String">OTHER: eFax</Calc-rplProduct><Txt-bandwidth type="System.String"></Txt-bandwidth><Bandwidth type="System.String">N/A</Bandwidth><Txt-MRC type="System.String"></Txt-MRC><MRC type="System.Decimal">40</MRC><Txt-NRC type="System.String"></Txt-NRC><NRC type="System.Decimal">30</NRC><Txt-Term type="System.String"></Txt-Term><Term type="System.String">MTM</Term><Txt-QuoteReceived type="System.String"></Txt-QuoteReceived><QuoteReceived type="System.DateTime">12/22/2016 00:00:00</QuoteReceived><Txt-Notes type="System.String"></Txt-Notes><Quote_x0020_Notes type="System.String">Notes 2</Quote_x0020_Notes><TextSpace type="System.String"></TextSpace></Item></Items></RepeaterData>

Hello Stefanie,

the problem is in the second item inside the xml, all the txt controls (Txt-Provider, Txt-Product ...etc) that you use to add the label name and the new line are empty.

why and how they are empty, i don't know, i never faced this issue before.

do you get the same issue when you add three or more items?

if you import the form to a different site collection, do you get the same error?

try to modify all controls (Txt-Provider, Txt-Product ...etc) to be visible = true, publish the form and try to add multiple items inside the repeating section, do you see all the values inside the controls? or the controls inside the first item are showing correctly and the rest are empty?

waiting for your feedback

Thank you

Ibrahim


I do get the same issue on three or more and when I make the text visible the second lines are blank. The first shows correctly and the second, third, etc. does not contain any data. I will try importing to another site collection as suggested.


Hello, I'm trying to pass the title of the search column into and I have not succeeded I get is the value ID of the record.

to get the display text of the drop down list or lookup

Workflow

into the XML Query

Instead of bringing the name of the record brings is the value of it.

Have any idea of how the title comes and not the ID

thank you very much


Hello Roderick,

to solve this, you have to add a calculated field inside the repeating section that reads the display text of the drop down list like the below image and hide it from the user (under a control or set a rule to hide it)

the replace() function is used to remove the ID and the ;# from the returned value of the drop down list and display the text only

replace(DropDownControl,",0-9]*;#","")

DropDownControl is the control that you will get the value from.

">0-9]*;#" is a regular expression to select any number before and including ;#

"" means null or empty text

hope that helps

Thank you

Ibrahim


Excellent!!!, this was what I changed for, thank you for helping us.

in the forms:

into the forms (Calculated Value) For each of the dropdowns list

Using UDA, change the outputs of LugarSalida by the calculated value CLugarSalida:

Results:

Emails:

List:

I just need to format the date, thank you again, I hope it works for someone else too.

Greetings.


Hey -

Maybe this is me but I have tried this and this is not working for me.

I have no idea why I should create those 4 textboxes.

Okay after running the working it's show the xml in plain text without the headers but that's it.

For me the form simply doesn't use those textboxes. I tried making them visible but when trying in preview mode no data gets inserted here.

ANy idea whay I could be doing wrong here?

Kind regards, D


Hello Dimitri Janssens

my post is a bit outdated, I read some articles that generates HTML table from repeating section XML like this one Repeating section as html table in mail, this is what I currently use in my environment. and its way easier than mine

now you can store the outcome in a multiline text column or send it directly in an email as mentioned in the article.

if you need any help with it, please feel free to contact me.

Thank you

Ibrahim


Hey Ibrahim -

Thanks for your response but let me re-phrase the issue here before going into this some further.

So what I have is the following ... I have a Nintex form which holds several repeating tables. Fyi, These are not nested.

Now within each repeating section I have 4 fields ( 2 drops downs - 1 textbox & 1 yes/no field ).

When I submit the form all data inserted in the repeating table gets returned in the following fomat in a column ( type: multi line Plain text column )

Example data returned:

<?xml version="1.0" encoding="utf-8"?><RepeaterData><Version /><Items><Item><lblPloeg1Comment type="System.String">test</lblPloeg1Comment><cboPloeg1User type="System.String">17</cboPloeg1User><cboPloeg1Workplace type="System.String">3</cboPloeg1Workplace><chkPloeg1TeamLead type="System.Boolean">False</chkPloeg1TeamLead></Item><Item><lblPloeg1Comment type="System.String">test</lblPloeg1Comment><cboPloeg1User type="System.String">14</cboPloeg1User><cboPloeg1Workplace type="System.String">5</cboPloeg1Workplace><chkPloeg1TeamLead type="System.Boolean">True</chkPloeg1TeamLead></Item><Item><lblPloeg1Comment type="System.String">test</lblPloeg1Comment><cboPloeg1User type="System.String">10</cboPloeg1User><cboPloeg1Workplace type="System.String">2</cboPloeg1Workplace><chkPloeg1TeamLead type="System.Boolean">False</chkPloeg1TeamLead></Item></Items></RepeaterData>
But in order for me to work with this data I would need it in a format as per example & this for each row within the repeating section.
User: ****
Workplace: ****
Comment: ****
Team lead: ***
This way I can pick it up & use it in power bi.
Hopefully this makes sense.
Kind regards, Dimitri.

Hello Dimitri Janssens

is it a must to have each output on a separate row?

isn't it easier for you to read data as a table?

Thank you

Ibrahim


Hi,

I'm trying to to parse XML to plain text on another column in my custom list. I have a date field and multi line text box field on my repeating sections. I followed the steps above, but doesn't seem to get the same result. Any advice?


Hi Albert,

I strongly suggest that you review this article https://community.nintex.com/docs/DOC-2754 its better and easier.


I came upon this post, and it appears to be what I need. However, it's not quite there. As you can  see in the image, I'm  only seeing a bit of the xml and the result is faded and not completely showing. Do you have any suggestions? Thank you.


I found my own answer ... the difference is if I'm looking in classic or modern  SharePoint.


Hi Ibrahim,

I am not able to put spaces between the default values of single line of text in repeating section. I am using the

 

My Output is:

My output should be        fffffffffffffffffffffffffff

                                        eeeeeeeeeeeee

                                        ggggggggggggg

Please suggest me.


Thank you for the tutorial! Parsing XML is such a pain for beginners.



 



Is there a way to insert a blank paragraph (between repeating sections output) with this method? Also, is there a way to bold the Simple Text?


Reply