TypeError when concat text before "indexed-repeat"

344
2
Jump to solution
01-17-2024 06:35 AM
SMH-Rio
New Contributor III

Hello everybody.

I'm trying to use the indexed-repeat function within the concat function, however, I've been receiving a "TypeError" whenever I concatenate some text before the indexed-repeat.

However, if I change the position of the same text after indexed-repeat, concat works normally.

SMH_Dados_Agol_0-1705501912735.png

SMH_Dados_Agol_1-1705501934239.png

concat(' abc ', indexed-repeat(${texto_pessoal}, ${beneficiario_e_cobeneficiarios}, 1))

concat(indexed-repeat(${texto_pessoal}, ${beneficiario_e_cobeneficiarios}, 1), ' abc ')

I've already tried to force the conversion of parameters with the "string" function, I've already tried putting "str" in bind::type and nothing worked. Replacing "concat" with "+" works in simple expressions, however, in more complex expressions (using the "if" function) I continue to receive the same error.

I'm using Connect 3.19.104

Any explanation or solution for this error?

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

I have seen pulldata do this before.  Trick was to have the function in a column all by itself then use that field in the concat.

Hope that works for you

View solution in original post

2 Replies
DougBrowning
MVP Esteemed Contributor

I have seen pulldata do this before.  Trick was to have the function in a column all by itself then use that field in the concat.

Hope that works for you

SMH-Rio
New Contributor III

This worked, Doug.

Ideally, support should be identified the reason for the error, because this solution requires many fields in xlsxform unnecessarily. But for now, it does the job.

Thanks for your help