Re: how to pass the ID of a slected item in a list to ORM

2018-06-22 Thread Gerald Brown
Thanks for the reply. On Tuesday, 19 June, 2018 04:17 AM, C. Kirby wrote: Yes On Friday, June 15, 2018 at 10:07:01 PM UTC-4, Gerald Brown wrote: When I inspect the object in Firefox that is what it looks like because it is generated by Django. Does the user have to select an item

Re: how to pass the ID of a slected item in a list to ORM

2018-06-18 Thread C. Kirby
Yes On Friday, June 15, 2018 at 10:07:01 PM UTC-4, Gerald Brown wrote: > > When I inspect the object in Firefox that is what it looks like because it > is generated by Django. Does the user have to select an item and then > submit it in order for me to get the ID? > > Thanks. > > On Friday, 15 J

Re: how to pass the ID of a slected item in a list to ORM

2018-06-15 Thread Gerald Brown
When I inspect the object in Firefox that is what it looks like because it is generated by Django. Does the user have to select an item and then submit it in order for me to get the ID? Thanks. On Friday, 15 June, 2018 10:29 PM, C. Kirby wrote: So you have a | A |B |||C || | If you make y

Re: how to pass the ID of a slected item in a list to ORM

2018-06-15 Thread Gerald Brown
The ID is an integer as it is the ID for the table. The name is a VARCHAR. I have had this same problem in the past with other programming languages.  How to get my head around how to get the ID for a selected item. On Friday, 15 June, 2018 10:09 PM, Anthony Anonde wrote: Sorry your question

Re: how to pass the ID of a slected item in a list to ORM

2018-06-15 Thread C. Kirby
So you have a A B C If you make your option tags look like {{person.name}} The submitted value for the field will be the patient_id, which you then use in your filter statement. On Friday, June 15, 2018 at 8:46:53 AM UTC-4, Gerald Brown wrote: > > Greetings: > > I have a form with a l

Re: how to pass the ID of a slected item in a list to ORM

2018-06-15 Thread Anthony Anonde
Sorry your question is a bit complicated, you have a form that contains a list of names and id, what data types are they contain in? Understand how the list box is structured will help to give you a better ans -- You received this message because you are subscribed to the Google Groups "Django

how to pass the ID of a slected item in a list to ORM

2018-06-15 Thread Gerald Brown
Greetings: I have a form with a listbox that has people's names and their ID from the database. I am trying to get the ID from that list for the selected person so I can use it in ORM statements: I.E. v1 = Visit.objects.filter(person_id = ??) where ?? is the ID from the select list. Has anyon