Quote from Ronnie on March 15, 2020, 11:37 amHi @luishp, I tried using neoTableDeleteRowbyID function and it doesn't delete the selected item. However, if I use ArrayDelItem, it works fine...
Below is my code:
ParseJSON "[neoTableRowString]" [tt] SetVar [sid] "[tt('id')]" .neoTableDeleteRowById "ViewsContainer" [sid] ArrayDelItem [mydata] [sid]Am I calling the neoTableDeleteRowByID correctly rather than using ArrayDelItem?
Hi @luishp, I tried using neoTableDeleteRowbyID function and it doesn't delete the selected item. However, if I use ArrayDelItem, it works fine...
Below is my code:
ParseJSON "[neoTableRowString]" [tt]
SetVar [sid] "[tt('id')]"
.neoTableDeleteRowById "ViewsContainer" [sid]
ArrayDelItem [mydata] [sid]
Am I calling the neoTableDeleteRowByID correctly rather than using ArrayDelItem?

Quote from luishp on March 15, 2020, 11:44 am@ronnie please provide a complete sample so I can take a look at the table.
Thank you!
@ronnie please provide a complete sample so I can take a look at the table.
Thank you!
Quote from Ronnie on March 15, 2020, 3:37 pmHi @luishp, Attached is a sample demo. Funny thing is I was able to retrieve the ID using the commands stated, but now I couldn't identify the ID selected with this 'cleanup' demo.
Questions:
- How to delete Row by ID?
- How to do a Search via textInput1 entry?
- How to correct the ID which doesn't work now?
- Any way to streamline the Insert data strings?
Hopefully you can check and correct them so that others could refer to this sample as a demo for simple LocalStorage database..
Hi @luishp, Attached is a sample demo. Funny thing is I was able to retrieve the ID using the commands stated, but now I couldn't identify the ID selected with this 'cleanup' demo.
Questions:
Hopefully you can check and correct them so that others could refer to this sample as a demo for simple LocalStorage database..
Uploaded files:

Quote from luishp on March 15, 2020, 11:55 pmHi @ronnie,
I have just take a quick look to you sample. At first sight, although you have defined the id field within the JSON it has not been included into neoTable. The id field should be a numeric unique value and must be part of the neoTable data in order to work:
neoTableSetColumn "ViewsContainer" 1 "id" "ID" "40px" true false true "" neoTableSetColumn "ViewsContainer" 2 "name" "Name" "80px" true false true "" neoTableSetColumn "ViewsContainer" 3 "gender" "Gender" "10px" false false true "" neoTableSetColumn "ViewsContainer" 4 "dob" "Birthday" "30px" false false true ""
Hi @ronnie,
I have just take a quick look to you sample. At first sight, although you have defined the id field within the JSON it has not been included into neoTable. The id field should be a numeric unique value and must be part of the neoTable data in order to work:
neoTableSetColumn "ViewsContainer" 1 "id" "ID" "40px" true false true "" neoTableSetColumn "ViewsContainer" 2 "name" "Name" "80px" true false true "" neoTableSetColumn "ViewsContainer" 3 "gender" "Gender" "10px" false false true "" neoTableSetColumn "ViewsContainer" 4 "dob" "Birthday" "30px" false false true ""
Quote from Ronnie on March 18, 2020, 3:55 amHi @luishp, while the sample neoTableEditor shows DELETE buttons, they're SQL instructions which is different as the demo does not illustrate the use of neoTableDeleteRowById function. Or for that matter, the neoTableGetSelectedId.
I might have missed something but tried various means, I could not delete the row by id, even using commands like
neoTableGetSelectedId "ViewsContainer" [idnum] neoTableDeleteRowById "ViewsContainer" [idnum]
Hi @luishp, while the sample neoTableEditor shows DELETE buttons, they're SQL instructions which is different as the demo does not illustrate the use of neoTableDeleteRowById function. Or for that matter, the neoTableGetSelectedId.
I might have missed something but tried various means, I could not delete the row by id, even using commands like
neoTableGetSelectedId "ViewsContainer" [idnum] neoTableDeleteRowById "ViewsContainer" [idnum]
Quote from Ronnie on March 18, 2020, 4:19 amOK, I found a solution by not using the reserved word "id" by using "idn" instead. This means using commands like:
neoTableDeleteRowsByValue "ViewsContainer" "idn" "[selectedID]"
works fine...
OK, I found a solution by not using the reserved word "id" by using "idn" instead. This means using commands like:
neoTableDeleteRowsByValue "ViewsContainer" "idn" "[selectedID]"
works fine...
Quote from Ronnie on March 18, 2020, 7:10 amHi @luishp, Another issue.. even running the NeoTable demo, using console checking.. when clickinbg on a row, the variable status for neoTableRow is showing "[object Object]". is there away to identify the selected row automatically via the eventManager subroutine? I tried adding a separate call to an external function putting scripts like:
StringifyJSON [neoTableRow] [s1] beginJS var obj = JSON.parse($App.s1); $App.selectedID = obj.idn; endJSEven adding a simple jsalert in the "click" section shows "[object Object]" result...
If [neoTableEvent] == "click" SetVar [thisEventData] "[thisEventData][neoTableField]" StringifyJSON [neoTableRow] [neoTableRowString] SetVar [thisEventData] "[thisEventData]<br/>[neoTableRowString]" jsalert "[neoTableRow]" EndIfHow do I retrieve the selected value upon user clicking on the record item using neoTable functions directly and calling a subroutine for follow-up action... without user clicking on a separate button to access the ID manually? For example,when I replaced the jsalert script with a subroutine, it doesn't execute...
Hi @luishp, Another issue.. even running the NeoTable demo, using console checking.. when clickinbg on a row, the variable status for neoTableRow is showing "[object Object]". is there away to identify the selected row automatically via the eventManager subroutine? I tried adding a separate call to an external function putting scripts like:
StringifyJSON [neoTableRow] [s1] beginJS var obj = JSON.parse($App.s1); $App.selectedID = obj.idn; endJS
Even adding a simple jsalert in the "click" section shows "[object Object]" result...
If [neoTableEvent] == "click"
SetVar [thisEventData] "[thisEventData][neoTableField]"
StringifyJSON [neoTableRow] [neoTableRowString]
SetVar [thisEventData] "[thisEventData]<br/>[neoTableRowString]"
jsalert "[neoTableRow]"
EndIf
How do I retrieve the selected value upon user clicking on the record item using neoTable functions directly and calling a subroutine for follow-up action... without user clicking on a separate button to access the ID manually? For example,when I replaced the jsalert script with a subroutine, it doesn't execute...
Quote from Ronnie on March 18, 2020, 7:42 amsolving the problem myself... after much testing, one method I did was to include whatever scripts I want to execute into the ViewsContainer code area. Definitely not the best but workable for now, unless there is a way to execute a script direct from the eventManager section..
solving the problem myself... after much testing, one method I did was to include whatever scripts I want to execute into the ViewsContainer code area. Definitely not the best but workable for now, unless there is a way to execute a script direct from the eventManager section..
Quote from Chillcoder on September 20, 2021, 7:21 amHi Ronnie.
I am having the same issue as cannot get the selected field in the table to show. In edit mode where you can set a selectable field when you click on it you still don't seem to be able to get the record id selected. neoTableGetSelectedId does not seem to work. I have the primary unique id field as the selected field too. It is showing in the table as a column next to the selectable one to show its there.
I have tried all combinations of the plugin commands to get an indication of the selected record in a table but nothing works.
Did you manage to find away to get this to work?
Hi Ronnie.
I am having the same issue as cannot get the selected field in the table to show. In edit mode where you can set a selectable field when you click on it you still don't seem to be able to get the record id selected. neoTableGetSelectedId does not seem to work. I have the primary unique id field as the selected field too. It is showing in the table as a column next to the selectable one to show its there.
I have tried all combinations of the plugin commands to get an indication of the selected record in a table but nothing works.
Did you manage to find away to get this to work?

Quote from Phil78 on September 21, 2021, 4:26 pm@ronnie Hi Ronnie
Why do not use neoTableSetSelectColumn ?
pnNew
neoTableSetSelectColumn "ViewsContainer" 1 "id"
neoTableSetColumn "ViewsContainer" 2 "id" "ID" "80px" false false false ""
neoTableSetColumn "ViewsContainer" 3 "name" "Name" "80px" true false true ""
neoTableSetColumn "ViewsContainer" 4 "gender" "Gender" "10px" false false true ""
neoTableSetColumn "ViewsContainer" 5 "dob" "Birthday" "30px" false false true ""pbDelete
you do not need to parse [neoTableRow]
SetVar [sid] [neoTableRow('id')]
jsAlert "Row to be deleted: [sid]"
neoTableDeleteRowById "ViewsContainer" [sid]
StringifyJSON [mydata] [myitems2]
SetItem "mylist" [myitems2]
. reload the data
GetItem "mylist" [myitems2]
ParseJSON "[myitems2]" [mydata]
.refresh updated data to table
neoTableLoadData "ViewsContainer" [mydata]
@ronnie Hi Ronnie
Why do not use neoTableSetSelectColumn ?
pnNew
neoTableSetSelectColumn "ViewsContainer" 1 "id"
neoTableSetColumn "ViewsContainer" 2 "id" "ID" "80px" false false false ""
neoTableSetColumn "ViewsContainer" 3 "name" "Name" "80px" true false true ""
neoTableSetColumn "ViewsContainer" 4 "gender" "Gender" "10px" false false true ""
neoTableSetColumn "ViewsContainer" 5 "dob" "Birthday" "30px" false false true ""
pbDelete
you do not need to parse [neoTableRow]
SetVar [sid] [neoTableRow('id')]
jsAlert "Row to be deleted: [sid]"
neoTableDeleteRowById "ViewsContainer" [sid]
StringifyJSON [mydata] [myitems2]
SetItem "mylist" [myitems2]
. reload the data
GetItem "mylist" [myitems2]
ParseJSON "[myitems2]" [mydata]
.refresh updated data to table
neoTableLoadData "ViewsContainer" [mydata]