Skip to main content

I am using a Type Ahead block in order to allow my users to link to accounts as they type. The problem I am running into is that the section needs to be repeatable. If I click the "Add" button for the repeatable section not only does the new "repeated" section not function but the original section no longer functions as expected.

 

Example 1 : If I click  "Add" BEFORE I fill in the first Type Ahead because I know that I will need to link 2 accounts then neither of the Type Ahead's function (they never return any results). 

 

Example 2: If I link the original Type Ahead before I click "Add" then the first one maintains the expected data but the second one still does not work. However I cannot go back and change the first Type Ahead block, if I do then it will no longer return any results. 

 

What are my options for repeatable Type Ahead block functionality. 

#Omnistudio #Vlocity #Vlocity Architects @Peter Fife

3 respostas
  1. 21 de dez. de 2022, 20:55

    So after doing some digging and testing I found the problem and a solution. The issue is that when a section repeats it can create a new structure underneath it.

     

    For example <RepeatableBlock:TAAccountBlock:TAData> becomes <RepeatableBlock:TAAccountBlock[n]:TAData> where [n] represents the position in the new created array that the element now exists in.

     

    So the solution is in the Type Ahead block on your Data Raptor Element>Properties under your Input Parameters>Data Source you need to append "|n" to the end of your Data Source value that is getting passed into the Data Raptor. 

     

    Ex: TAAccount would become TAAccount|n

     

    Now your TA block will work as a single or for as many repeats as you might need. 

0/9000