I need to take the contents of an expanding table, concatenate it and then add all the 'rows' of text together in a text field. Hopefully below will explain:
This table needs to be concatenated and then inserted in a single text field
To be inserted into a single text field to become:
Mickey Mouse Level 1 General Legal firstname.lastname@example.org 1234567890
Donald Duck Level 2 - Specialist - Exercise Leader Consumer email@example.com 0987654321
I am struggling to reference each of the new row instances and also to combine into one text field? Can anyone point me in the right direction please?
You can store your PDF on Google drive and send me a link so I can download it, or any website which can store a file and be downloadable
So I've noticed that your repeatable row is your table and not the row itself, which that will change your code,
It is much easier to tell what to do when we know how the hierarchy looks like, so here we go
Hope this will work!
Thanks for responding - I've managed to sort this issue thanks. I have another issue (my form is losing conditional formatting when saved) which I'll post seperately - thanks for your help mate appreciate it
Hi ellis, yes I managed to download your pdf from your dropbox.. seems like my browser was the issue.
I've taken a look at your pdf and I don't seem to understand what you are trying to do as it looks all good to me when I try it, of course the code is not complete yet...
but what is it exactly you are trying to do and it's not working?
Strange . I've removed all the files from my dropbox share and have re uploaded version 5 here:
Can you access it?
I do not think this is working and I have had this file crash LCD for me several times with a Runtime error. Not sure what is going on.
Hi there, your link is still not working
Thanks for getting back Magus - Yes I absolutely do still need help , tbh I have been trying everyithing to get this resolved as I'm under pressure from work to deliver my form!
Basicaly I am trying to do the same as before but have a different hierarchy and I have been unable to get the referencing correct
I have a form and I need to take the contents of an expanding table, concatenate it and then add all the 'rows' of text together in a 'Concatenated' text field (CONCAT Workforce). Hopefully below will explain:
The expanding table below:
Needs to be concatenated in the 'CONCAT Workforce' Textfield to display as:
Mickey Mouse Team 1 Widgets Brand Marketing Contact Centre Normal Business Hours
Donald Duck Team 2 Wingnuts Corporate Communications Engineering Extended Hours
The problem is one of hierarchy I believe as my 'repeatable section' includes an 'Add Details' hidden section that needs to repeat for every row. I think this may be screwing up the referencing for your code and I can't figure out the correct referencing (I've tried everything! ). It kind of works when I place the concatenated text field in the same subform however the text field also then gets repeated which is not desired.
The link below is as close as I can get in that it picks up the first instance only, I have several other sections of the form that have the identical hierarchy as this and am hoping I won't need to alter it to fix the issue. If you could take a look Magus it would be awesome!? Also (if I can be cheeky!) could you put some notes in the code explaining what is going on? This will help me understand and be able to alter the code if required for further sections)
Sorry for waiting so long for answering back, seems like your link is not working anymore...
do you still need help to have this fix?
Soo... I've managed to use your code for 3 sections of my (rather complicated!) form - FANTASTIC THANKYOU! however I have one other type of 'expanding section', and I am unable to get it to work for.
The problem is one of hierarchy I believe as my 'repeatable section' includes an 'Add Details' hidden section that needs to repeat for every row. I think this may be screwing up the referencing for the code you have kindly supplied and I can't figure out the correct referencing (I've tried everything! ). It kind of works when I place the concatenated text field in the same subform however the text field also then gets repeated which is not desired.
I'm trying to achieve the same result as previously (ie the concatenated single text field with the 'Workforce Name', 'What does it deliver' etc (btw I think I'm fine adding and removing these as required as I can understand the code))
I would be really grateful if you could advise or 'work your magic' please? I've placed the section of the form on my dropbox as previously below.
Absultely brilliant ! Many Thanks!
I have several of these to do for my form and will use your code as the basis for all of them.
I will endeavour to understand your code and utilise it ( I supspect I will encounter difficulties later as I have repeating subforms which look like tables but I'll cross that bridge when I come to it! )
Many, many thanks
Thanks for the reply, I've inserted the code above into the calculate event of the textbox but no text is being displayed in the concatenated textbox at runtime? I'e tried to examine your code for any typos but cant see anything obvious (tbh I'm new to JS so propbably wouldn't ) - is there anyway I can attach the form to this thread?
Many thanks for your help Magus
I've tried in vain for hours to get this to work - it's almost there I feel, but I can still only get the first row to populate the text field I want to concatenate everything in. (I've reduced the target text to just the Name field for the time being until I get the code working to simplify.)
Any advise would be much appreciated and probably save a few of my hair follicles as I am pulling them out over this!
This is an image of the hierarchy and the code I have on the calculate event of the text box:
And this is the result: only the first row is pulled across?
I suspect it's hierarchy or possibly the way I am repeating the row with the '+' button - here is the code behind that in case it helps:
//This assigns rowNum varaible as being 1 more than the table index then adds a row at this postion when Butto1 is clicked thus adding to bottom of table
var rowNum = this.parent.index + 1;
//the number of 'parents' above will depend on the heirarchy of the form
Thanks a lot for your reply, my hierarchy is complex tbh but I'll give this a go
Thanks again - really appreciate you taking the time.
I'll post my results later!
I don't know what is the hierarchy of your form... but your code should look something like this, considering your table is named "Table1" and your rows "Row1"
I also would consider you have a subform which contains your textfield and that subform can have multiple instances
This should do the trick, just make sure you have the right paths for each object in your row
Hope this help!!