Now getting to what I need.
In the 'add columns' action, can I perform a validation by retrieving the index of the iterated array?
I'll be more specific.
The database query returns...
{
"query_lista_recorrencia": [
{
"cliente_nome": "THIAGO TONELI",
"cliente_cpfcnpj": "21963044843",
"produto_descricao": "TAJPDV PDV+",
"valor": 169,
"dta_inicio": "2026-01-04",
"dta_primeiro_fatu": "2025-12-16"
},
{
"cliente_nome": "ANA PAULA PARRA TONELI",
"cliente_cpfcnpj": "35898652884",
"produto_descricao": "LINK PRO",
"valor": 250,
"dta_inicio": "2026-01-04",
"dta_primeiro_fatu": "2026-01-16"
}
I would like to add a column called 'proportional' validating the value of 'query_lista_recorrencia.dta_primeiro_fatu' == '2026-01-16'
if it is true, return 'ok', otherwise return empty.
To do this, in the 'Add Columns' function I put 'Collection' and 'query_lista_recorrencia', in 'Name' I put 'proporcional' and in 'Value' I put this ternary statement ''query_lista_recorrencia[$index].dta_primeiro_fatu=='2026-01-16'?'ok':'' in order for it to validate the index of each array, but it didn't (I'm not saying it should, I was testing it).
I did another test pasting this sentence into 'Value': ''query_lista_recorrencia[0].dta_primeiro_fatu=='2026-01-16'?'ok':'' and ''query_lista_recorrencia[1].dta_primeiro_fatu=='2026-01-16'?'ok':''
The ''query_lista_recorrencia[0].dta_primeiro_fatu=='2026-01-16'?'ok':''
returned
"set": [
{
"cliente_nome": "THIAGO TONELI",
"cliente_cpfcnpj": "21963044843",
"produto_descricao": "TAJPDV PDV+",
"valor": 169,
"dta_inicio": "2026-01-04",
"dta_primeiro_fatu": "2025-12-16",
"proporcional": ""
},
{
"cliente_nome": "ANA PAULA PARRA TONELI",
"cliente_cpfcnpj": "35898652884",
"produto_descricao": "LINK PRO",
"valor": 250,
"dta_inicio": "2026-01-04",
"dta_primeiro_fatu": "2026-01-16",
"proporcional": ""
}
and when I used ''query_lista_recorrencia[1].dta_primeiro_fatu=='2026-01-16'?'ok':''
returned
"set": [
{
"cliente_nome": "THIAGO TONELI",
"cliente_cpfcnpj": "21963044843",
"produto_descricao": "TAJPDV PDV+",
"valor": 169,
"dta_inicio": "2026-01-04",
"dta_primeiro_fatu": "2025-12-16",
"proporcional": "ok"
},
{
"cliente_nome": "ANA PAULA PARRA TONELI",
"cliente_cpfcnpj": "35898652884",
"produto_descricao": "LINK PRO",
"valor": 250,
"dta_inicio": "2026-01-04",
"dta_primeiro_fatu": "2026-01-16",
"proporcional": "ok"
}
that is, it validates the index in the ternary condition, but I don't know if it's possible to dynamically retrieve the index from the routine.
Did you understand?