Change the value of variable at runtime

Certified Associate Developer

I want to the change the value of same tag in a single document at runtime

for example :- 

Schedule_1 : A

Schedule_1 : B

Schedule_1 : C

Schedule_1 : D

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Richa sharma

    Document Template would be static. So it would have a fixed number of ##Names## tag in your case.

    Why don't you name them as ##Name1##, ##Name2##, ##Name3##, ##Name4## ?

    or anything to make them unique and you can map it as usual.

    If you are using dynamic templates within the node, even then the keys should same, and if you are trying to achieve this to code the values easily, you may try to get a list of names and index it to the keys

    Eg:

    you have your data as say in a pv!docData: 
    {

    name: {    "Richa S", "R Sharma", "Richa Sharma", "Sharma Richa" }

    }

    then in your node, you can map the keys as:

    Name1: index(pv!docData, "name", 1)

    Name2: index(pv!docData, "name", 2)

    Name3: index(pv!docData, "name", 3)

    Name4: index(pv!docData, "name", 4)

    Hope this helps ! 

    Or, can you explain your use case a little more, why do you need same tag to iterate on a list ?

Children