How do you assign a photo to each name even if the same?

Good morning everyone.
Scusate

1 Like

You need to work with lists: a list of (names), a list of (images), then a list of lists of the combinations created (name,image). Your choice of name from the textbox (I would use a listview/spinner to select a name to avoid spelling mistakes, and ensure only the names in the list are available for selection) can then return the combination data.

Your workflow is not clear from your pdf.

Also, please post directly to the community, instead of generating additional files (e.g. your pdf) and work (download a file / open a file / etc.) for those trying to help you.

Something like this:

namesAndImages.aia see updated aia project below

I tried this, but it doesn't populate the listview and the data is reported backwards.
Furthermore, I wouldn't know how to use them to then make the image appear by loading the name and numbers.
Now I'll try yours.


foto_ins.aia (1.4 MB)

As you can see, when I pressed Mary again it displayed the last image chosen for Joel.

So the system is correct, but when I choose mary the second time it must display the last image chosen by mary.

Same for everyone else.
Example:
I choose Mary 4 times, twice I chose the first image, the third time a different one, the fourth time the first again.
The fifth time I choose Mary it must display the last image she chose. in this case the first.

If on the fourth time she chose the second image, when her name returns, the last image she chose must appear, in this case the second.

But never the one you chose last, another and the same for all the names.

OK, this is because the listview selections are not clearing after Assign or Reset. An oversight on my part.

namesAndImages_revised.aia (589.9 KB)

Good thing you posted your barnyard again, because I was writing you to do so.
""
So what should I do, don't blame me, but I really don't know how I should delete, what and where I should insert the deletion.

Please complete your .aia.

You know that it's already difficult for me to understand how I can modify your code and then insert it into my app. imagine everything else, which for you is easy, for me when you tell me to intervene in your code and in your lips, even for a simple operation, I already get feverish just thinking about it.
"""
Now I'll try it.

You didn't mention delete in your pdf....

What do you want to delete?

You see, we both make errors of interpretation when we read translations.

What you read was the text I was about to send you before you posted me the second .aia with the correction, and it referred to the fact that I understood that I would have to make the changes, and I replied that I didn't know how do them, not understanding your code.

Great! it works, now I hope to be able to insert it into my app.
I don't list the problem as solved, because if I have any other questions and I can't put everything into my app, at least I don't have to reopen the post.

Have a good day or good evening. Thanks again so much.

Good morning.
I know that I am taking advantage of your patience and that I often explain myself badly but believe me I tried to adapt your blocks to my project on my own, but I couldn't.

Your solution is optimal because it is the only one that can be adapted to my app (knowing how to do it), and that up to now, after a lot of research on my part, you have finally solved it for me.

But the name of the person and the image appear in the listview3, (the name of the animal which should be displayed in the label as per my scheme would be missing)

While for my project, I would need each object to be loaded inside its container and not in listview3, as per the scheme, of the attached .aia file.
So:
Person Name = Textbox1
Animals Name = Label1
Image Animals= image1
so that each name displayed corresponds to the image chosen last, exactly as in your project.
Immagini.aia (385.5 KB)

Easy enough (even for you!)

In my example:

Remove the Listview3 and its associated blocks
Remove the combined global

Add a textbox, label, and image component in the bottom half of the screen, and format to your liking

Change the Button1 and Button2 blocks to match this:

1 Like

In fact, I had already done it, I just wanted to see if you were capable of it. (laugh)

I thank you for the trust you place in my preparation, but if you had seen all the tests I did, you would have removed me from the forum.

I'll try now and tell you.

Eureka. thanks.

A warm greeting and many thanks again, great Timal2.

Sorry, maybe I did something wrong, but I hadn't noticed that when I recall the name Mary after several choices, hers doesn't appear.
Both the last name and the last image remain.
Prova2image.aia (590.2 KB)

You now appear to have added another layer, which is to save the last selection for each person.

You can use a tinydb for this.

I will leave you to work it out, save wasting my time again, if you "have already done it" :wink:

I couldn't wait to be assigned such a task.

I'm really happy about it, thank you! I hope you will prepare many more while I solve this problem, I was looking forward to having something so simple to do.

Putting my hilarity aside.
I remind you that you had already solved this problem, in fact before the changes if I selected Mary and an image and made other selections with other names, when I returned to typing only the name Mary, the image associated with her appeared.

It would be enough for that part of the blocks that inserted the images and names in the listview3 to do the same operation for the texbox, the lebel and the image separately and everything would be resolved, I tried this but nothing to do, too easy for me, I need to bigger problems to solve, such as the database.

I'll tell you, it's not an easy task, but I'll try, so as to give you the time necessary to beat me quickly by solving it before me.

How do you make emoticons appear?

emoticon
in an app

in the community, type : and wait for a dropdown, then select. :wink:

Change Button1 to look like this:

Add new button (Button3) to fetch animal name and image from name typed in textbox

1 Like

Really sorry Timal2, I didn't think it was so hardworking.

I really made you work a lot, I'm sorry and I thank you again for all the time you dedicated to me.

Yet it seemed so simple.

It works well, I will give you final confirmation once it is inserted into my project.
But in the meantime I'll close everything as resolved, the rest will depend on me.

Criss I don't understand what I have to do for the emoticons, it's not important but knowing it makes me happy.
I understand, sorry, I thought the colon was a suspension of the discussion.