0

Select items or record by record

How do I get the Voornaam one by one:

Script:

let t := "";
let firstNames := for item in Namen.Voornaam do
t := t +  Namen.Voornaam +", "
end;
t

result :

"GregoryAmandine, GregoryAmandine,"

I want to get 

"Gregory, Amandine, "

 

in the manual I found this example

let firstNames := for item in response.result do

item.fields.'First Name'

end

I also tried to use is like

let firstNames := for item in Namen.Voornaam do

item.fields.Voornaam

end

 

this script failed on the items in the second line

Q:

How can I get item by item eg. Voornaam by voornaam

and

how to use items

1 reply

null
    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    You can use join() e.g.: let firstnames := join((select Tabelnaam).Voornaam, ",")

    You then get a "," separated string. If you want to get item by item, you first make it an array like this: let array := split(firstnames,",")

    To get the first item you use : item(array,0) (arrays start counting with zero)

    All in one : item(split(join((select Namen).Voornaam,","),","),0)

    Steven

Content aside

  • 3 yrs agoLast active
  • 1Replies
  • 508Views