Problem during creating a list based on SQLite SELECT

Hi all,

I am creating a list based on a SELECT SQL from a SQLIte table and I am trying to populate a list with all data, as showed below:

Captura de Tela 2023-11-01 às 09.25.57

But when I execute (both companion and APK) I receive the message:

It's like I had made a repeated entry in the list... Where am I wrong?

TIA,

Please show list: global itensMaterials

1 Like

Why not just copy this list to your new list ?

1 Like

Interesting idea. I had not thought about it. I'll try right now and tell you the result.

Fantastic!!! It solved the problem. And in fact, it's not necessary create a copy from a list which already has the data from SQLite table... So I could cut this second global list off.

Thank you, @TIMAI2 !!

Or did I misread what you were trying to achieve? If you wanted all the sublist items in a single string, then you could use the list separator block to do that....

In fact I am trying to create a parameter (list) with all fields together to be sent to remote server.

Just complementing... the copy list block solved the problem of generating a new list, based in the previous one. Now I have to get each data from the list and create a parameter to be sent via POST, like:

&items=1,ANTEPARO SEMCO,,,2

And I tried again to use the for each in List and the error from the first post appeared again.

I'm searching here for a solution.

TIA,

Something like this?

Also I notice that in your second sublist you have a comma in the field. This could cause problems, so you may want to clean your data in the sqlite database to remove any commas...

Draggable Procedure

1 Like

This is where your original blocks went wrong:
dec412251079b642cabadc9fa284588307aa46cb

1 Like

Ahhhhh... let me replace it. Thank you, @ABG. I'll try it now and tell you my results.

Yes, that was it!! Thank you very much @ABG !!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.