Local DB / How to add new row?

Hi everyone. I want to make a “Contacts” app. Which has a simple database (“Local DB”) table “contacts” and which contains of 2 columns. “Name” and “Number”. Very simple yeah…

There is problem when i want to “Add new contact”.

There is my algoritm.

WHEN Button1 Click
do {
in “contacts” set (Cell)
column -> 1
row -> in “contacts” get “NumberOfRows” + 1
value -> from TextInput1 get Text

in “contacts” set (Cell)
column -> 2
row -> in “contacts” get “NumberOfRows” + 1
value -> from TextInput2 get Text
}

Application doesnt give an error. But it doesnt create new row on database…

Please dont advise me use Spreadsheet Airtable or Firebase. I must do this in Local DB (offline). Without any online databases.

Thank YOU!

Hi,

Local DB has no blocks for dynamically changing the structure of the table at the program execution stage. Therefore, you need to create as many empty lines in the Local DB as you need in the designer. To do this in Excel, select the desired number of empty rows and insert them into the table. Before adding a new record to the table, you must find the index of the first empty rows.

%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5

Another way is to use the list and store it in the local storage using a variable of “storage” type or the Local Storage block of the local storage.

1 Like

Thank you sir!

hi will you please help in linking photos to each contact or row for before excel file.

Sorry, but I did not understand your question. If you need to copy data from Excel into a table, then in Excel you create all the fields and links to the url of the images.