Array or Json for neoTableEditColumnAsSelect? - Forum

Forum Navigation
You need to log in to create posts and topics.

Array or Json for neoTableEditColumnAsSelect?

Is this possible? I only see that it asks to specify hardcoded values....

I have tried it but it does not work...

@egodyla in VisualNEO Web you can allways use variables as parameters.

SetVar [option1] "Option 1"
SetVar [option2] "Option 2"
SetVar [option3] "Option 3"
SetVar [options] "[option1]\n[option2]\n[option3]"
neoTableEditColumnAsSelect "Container1" "1" "inline" "" "Select an option" "[options]" "" true ""

Note how I use \n as a new line character.

Hi @luishp have an array (Joueur) built with neophpexecsql

$App.Joueur
neoTableEditColumnAsSelect "Container2" "1" "inline" "" "" "[Joueur]" "" true ""
neoTableEditColumnAsSelect "Container2" "2" "inline" "" "" "18h\n18h30\n19h\n19h30\n20h\n20h30" "" true ""
but when I call the table I have this error only for column 1 ?
Uncaught TypeError: selectData.split is not a function

    neoTableEditColumnAsSelect http://localhost/TableMaitreDetail-Web/js/main.js:68
    

@phil78 neoTableEditColumnAsSelect expects the data in the "Options" parameter as a string, where each option is separated by a newline character (\n). If [Joueur] is an array, you can't pass it directly.

This is incorrect:

neoTableEditColumnAsSelect "Container2" "1" "inline" "" "" "[Joueur]" "" true ""

Instead, convert the array to the correct format.

This should work:

BeginJS
   $App.JoueurStr = $App.Joueur.join('\n');
EndJS
neoTableEditColumnAsSelect "Container2" "1" "inline" "" "" "[JoueurStr]" "" true ""

 

Phil78 has reacted to this post.
Phil78