Issue with .caption.value.#text.value

Avatar

Avatar
Validate 1
Level 1
edgar65234674
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
edgar65234674
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
edgar65234674
Level 1

23-08-2019

Hi all,

I have a Formcalc code to concatenate several fields together at the end of the form but I want to have the field caption text and field caption value in the final text. As example:

concat(TextField1.caption.value.#text.value," ",TextField1)

I hope you can help me!

Thanks...

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
_Bruce_Robertson
MVP

28-08-2019

That should work, maybe try

TEXTFIELD1.caption.value.oneOfChild.value

Otherwise, maybe a screenshot of your form structure would help, or even a link to your form

Has the caption any rich text formatting ... bold, italic, colours, etc

Answers (6)

Answers (6)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

27-08-2019

What kind of object is HEADER_TXT? When it's a separate text object and not a text field with a caption, the script would be more this:

concat(HEADER_TXT.value.oneOfChild.value, …)

Avatar

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
_Bruce_Robertson
MVP

28-08-2019

Good to hear, I think that means you caption had some rich text formatting, not that it was a text field ... just something to be aware of as you could end up with the same problem with your drop down.

Avatar

Avatar
Validate 1
Level 1
edgar65234674
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
edgar65234674
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
edgar65234674
Level 1

28-08-2019

Excellent, the oneOfChild option did work!!!

Avatar

Avatar
Validate 1
Level 1
edgar65234674
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
edgar65234674
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
edgar65234674
Level 1

27-08-2019

Great, HEADER is a text object, this code works!!!!

My only problem at this point is with TextFields, the ".caption.value.#text.value" works perfect with other objects like DropDownLists but for some reason is not working with TextFields captions. Every time I try with TextFields I get an error: "accessor 'TEXTFIELD1.caption.value.#text.value' is unknown"

Any idea?

Avatar

Avatar
Validate 1
Level 1
edgar65234674
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
edgar65234674
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
edgar65234674
Level 1

26-08-2019

Hi,

Is not working for all fields, the concatenate function is only showing the field value but not the captions. My smartform is looking to concatenate several Text Captions, Text Field Captions and Text Field Values into a text that can be copy-paste in another platform.

Here is one example:

//HEADER (just a text box in the form with some captions): Data to concat

//TextField1 (field with a caption and space to capture input): Enter name

//DropDownList1 (list with a caption and options to capture input): Select title

var HEADER_TXT

var TEXTFIELD1_TXT

var DROP1_TXT

concat(HEADER_TXT.caption.value.#text.value,"\u000a",TEXTFIELD1_TXT.caption.value.#text.value," ",TEXTFIELD1,"\u000a",DROP1_TXT.caption.value.#text.value," ",DROPDOWNLIST1)

I was expecting to get as result the text all together:

Data to concat

Enter name: Edgar

Select tile: Mr.

But is only working with the drop downs menus, not with text fields or text boxes.

Thanks for your time!

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

25-08-2019

The script should work. What problems are you facing with?