Sign In   Register
  Tuesday, 10 August 2021
  2 Replies
  241 Visits
1
Votes
Undo
  Subscribe

I have a Repeat Block Template in the Form with the below fields inside the Repeated Content:

textfield: userName (id)
textfield: userAge (id)

 

How do I map the above to the properties in the Model (already created) below?

<applicant>
    <repeatingFields>
        <individual>
            name   <--- property (it has a circle on the left in the Form editor)
            age      <--- property (it has a circle on the left in the Form editor)
        </individual>
    </repeatingFields>
</applicant>

 

And the expected outcome in the submitted xml is:
(I have trouble achieving this)

<applicant>
    <repeatingFields>
        <individual>
            <name>John</name>
            <age>33</age>
        </individual>
    </repeatingFields>
    <repeatingFields>
        <individual>
            <name>Peter</name>
            <age>44</age>
      </individual>

    </repeatingFields>
</applicant>

 

I have tried mapping the fields (userName, userAge) to the Model's name and age (e.g. select field userName, then double click name on the Model). But only the last repeat (Peter, 44) appeared and is inside the <TrackingCode> (which is not what I want)

If I use Repeat instead of Repeat Block Template, it still only returns the last repeat (Peter,44), however, it is in the proper structure (ie. <applicant> ...)

Thoughts

  • I believe the model's <repeatingFields> structure together with <name> and <age> shall also be made known to Maestro in some way to identify it as a repeat block maker in order to build the desired XML data for submission. How do I achieve this?
3 months ago
·
#14218
Accepted Answer
0
Votes
Undo
Hi Alan,

to map a RepeatBlock to a Model try the following.

In the Repeating Block Template, set the ID of the 'Repeat' as a model item 'applicants_individual_'. Note the underscore at the end.
The for each field of the repeat, set the ID as 'applicants_individual_name', and 'applicant_age'.

That should then give you the formXml structure as:

<applicants>
<individual>
<name>John</name>
<age>33</age>
</individual>
<individual>
<name>Peter</name>
<age>44</age>
</individual>
</applicants>

Hope that helps.

Thanks
Mark
3 months ago
·
#14219
0
Votes
Undo
Great comments!

For your information, Maestro has this functionality as well -https://docs.avoka.com/Forms/Data/DataMapper.htm - so maybe it can help in the future.
Alan Lee selected the reply #14218 as the answer for this post — 3 months ago
Alan Lee selected the reply #14218 as the answer for this post — 3 months ago
3 months ago
·
#14218
Accepted Answer
0
Votes
Undo
Hi Alan,

to map a RepeatBlock to a Model try the following.

In the Repeating Block Template, set the ID of the 'Repeat' as a model item 'applicants_individual_'. Note the underscore at the end.
The for each field of the repeat, set the ID as 'applicants_individual_name', and 'applicant_age'.

That should then give you the formXml structure as:

<applicants>
<individual>
<name>John</name>
<age>33</age>
</individual>
<individual>
<name>Peter</name>
<age>44</age>
</individual>
</applicants>

Hope that helps.

Thanks
Mark
  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!

Q&A Forum - Tips

The purpose of the Temenos Journey Manager platform (TJM) Q&A forum is for all clients and partners to seek help...

Read More

Not a member?

Register to ask a question and access to more content.

Join now

Looking for something else?

You can request access to:

  • Courses
  • Full Release Notes
  • Product Downloads
  • SDK

Request access

Leader Board

1
Mark Murray
User's Points: 1360
2
Lin Vanoevelen
User's Points: 1046
3
Julio Berrueco Pinto
User's Points: 715
4
Matthew White
User's Points: 386
5
Chad Thomas
User's Points: 300