Android Question ClvFloating Titles with Sqlite DB

ProjectGroup19

Active Member
Licensed User
Hi everyone!
I've been searching for clvFloating Titles to display data from a Sqlite Db and just found clv floating titles examples but with items from a loop. I've found Erel's examples with floating titles and others but without Sqlite db. I have a Sqlite db with election positions, some positions have 4 candidates others have 3 or less...and what I'd like to display is That Positions (without repeating) as Title and the candidates as items.. I just know how to do the sql sentence in my db but I can't implement that results into a Clv floating titles. If there someone to help me I'll appreciate it. Thank
 

ProjectGroup19

Active Member
Licensed User
You are confusing different things. It doesn't matter where the data comes from. Get the data, sort it and organize it however you like and then add it. You just need to call AddTitle after each group.
Thank you.
But the sorting and organizing is the issue I'm currently finding difficult to do.šŸ˜”

I would be very glad if you can help me with an example.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
I would be very glad if you can help me with an example.
Are you looking for something that looks like this snapshot on the xClv and the data is extracted from a SQLIte database table:. See attached image
Post a copy of your database if not confidential or maybe mimicked with fake data will help
 

Attachments

  • ProjectGroup042221.png
    ProjectGroup042221.png
    17.2 KB · Views: 221
Last edited:
Upvote 0

ProjectGroup19

Active Member
Licensed User
Are you looking for something that looks like this snapshot on the xClv and the data is extracted from a SQLIte database table:. See attached image
Post a copy of your database if not confidential or maybe mimicked with fake data will help

Screenshot_20210422-150330_1.jpg
Something like this but the similar headings should be grouped. So in this case, the Treasurer position which as two candidates, I want to group the two candidates under the same position.

the Database for the candidates contains,
ID, Picture, Name, Position.

I'm trying to do a voting system that will retrieve all the candidates in the database and the user can check the check box to vote for one candidate per the positions.
 
Last edited:
Upvote 0

Mahares

Expert
Licensed User
Longtime User
I want to group the two candidates under the same position.
If you upload your project and the SQLite database, perhaps someone will try to get an idea of what you want to do and help. I asked you in a previous post, but you must have overlooked it or don't want to do it. At least, upload the database
 
Upvote 0

ProjectGroup19

Active Member
Licensed User
If you upload your project and the SQLite database, perhaps someone will try to get an idea of what you want to do and help. I asked you in a previous post, but you must have overlooked it or don't want to do it. At least, upload the database
Please, how do I upload the database?

The Structure is: ID, Name, Picture, Position.
Row 1: 1, Owusu Sarpong, pic, Treasurer.
Row 2: 2, James Sarpong, pic, Organizer.
Row 3: 3, Project Group,pic, Treasurer
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Please, how do I upload the database?
I am assuming you already have a SQLite database named something like mydb.db. on your PC. Click on 'Attach Files. button located on the bottom left of the post you are composing, then look for the file on your computer and attach it.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Are you sure you have a database available, because it should only take a minute or so to upload a file to the forum. I think you are looking for a customlistview with a look like the attached, but you have been reluctant to upload your database if you have one prepared. There is no shame in saying you have no code or database if you have not started your project or don't know how to get started. You are engaging in a project that needs some experience and B4X knowledge.
 

Attachments

  • xClvscreenshot042421.png
    xClvscreenshot042421.png
    30.7 KB · Views: 153
Upvote 0

ProjectGroup19

Active Member
Licensed User
Are you sure you have a database available, because it should only take a minute or so to upload a file to the forum. I think you are looking for a customlistview with a look like the attached, but you have been reluctant to upload your database if you have one prepared. There is no shame in saying you have no code or database if you have not started your project or don't know how to get started. You are engaging in a project that needs some experience and B4X knowledge.

Exactly what I want to do.ā˜ŗ
Thank you very much @Mahares, for your help.
Please, how did you do that?

You are engaging in a project that needs some experience and B4X knowledge.
No doubt about this. I have tried working on this for almost a week.

Are you sure you have a database available, because it should only take a minute or so to upload a file to the forum. I think you are looking for a customlistview with a look like the attached, but you have been reluctant to upload your database if you have one prepared. There is no shame in saying you have no code or database if you have not started your project or don't know how to get started.
My bad!šŸ„ŗ
I went offline to run an errand.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
I went offline to run an errand.
So where is a copy of your database, or if its data is confidential, provide made up data in the table I have been asking you to upload a copy of the db in every post I made, but you keep ignoring the request. How are you going to get help when you are not doing your part and not cooperating. You certainly must have some sort of database if your thread title talks about SQLite.
 
Upvote 0

ProjectGroup19

Active Member
Licensed User
So where is a copy of your database, or if its data is confidential, provide made up data in the table I have been asking you to upload a copy of the db in every post I made, but you keep ignoring the request. How are you going to get help when you are not doing your part and not cooperating. You certainly must have some sort of database if your thread title talks about SQLite.
forum.PNG

I zipped the db file because of the error i encountered.

Please, Sorry for the delay in uploading the db file.
 

Attachments

  • svoteDB.zip
    114.1 KB · Views: 111
Upvote 0

Mahares

Expert
Licensed User
Longtime User
zipped the db file
I took a look at your database. The problem with the table CANDIDATE is that you have the 2 records that have Treasurer as position, for one you have it spelled: Treasurer and for the other record it is spelled Treasurer... That is it has 2 or 3 dots at the end of it. Therefore, when you were trying to group the records by POSITION, they are going to be 2 groups instead of one. If after you make that correction and have problems with your code, then come back for some more help. That is the reason why I have been asking you to upload your database. Sometimes, it is the little things that drive insane.
 
Upvote 0

ProjectGroup19

Active Member
Licensed User
I took a look at your database. The problem with the table CANDIDATE is that you have the 2 records that have Treasurer as position, for one you have it spelled: Treasurer and for the other record it is spelled Treasurer... That is it has 2 or 3 dots at the end of it. Therefore, when you were trying to group the records by POSITION, they are going to be 2 groups instead of one. If after you make that correction and have problems with your code, then come back for some more help. That is the reason why I have been asking you to upload your database. Sometimes, it is the little things that drive insane.
Thank you
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Can you please, share with me. That is what I'm struggling with.
OK. I am making you a project from scratch by creating the database from the start as your database may have some problems and I will post the project or PM to you, but before that, can you attach the 3 pictures individually you have in your database representing the 3 individuals as jpg or png files so I can test them with the database I am working on so there are no problems with those icons.
 
Upvote 0

ProjectGroup19

Active Member
Licensed User
OK. I am making you a project from scratch by creating the database from the start as your database may have some problems and I will post the project or PM to you, but before that, can you attach the 3 pictures individually you have in your database representing the 3 individuals as jpg or png files so I can test them with the database I am working on so there are no problems with those icons.
I'm truly grateful for your help. Thank you very much.

The picture for the 3 individuals were test picture. You can use any picture or should I still send them?
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
ou can use any picture or should I still send them?
No need to send if they are only test pictures. As mentioned , I am recreating the database with the CANDIDATE table using your nomenclature and the names you used for the columns in your order so you do not get confused. The database you sent has problems, so I am avoiding it.
 
Upvote 0

joko0124

Member
Licensed User
Longtime User
OK. I am making you a project from scratch by creating the database from the start as your database may have some problems and I will post the project or PM to you, but before that, can you attach the 3 pictures individually you have in your database representing the 3 individuals as jpg or png files so I can test them with the database I am working on so there are no problems with those icons.
Can I have the example project please?
 
Upvote 0
Top