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 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
    |
    <select>
    <option>A</option>
    |<option>B</option>
    |||<option>C</option>
    </select>
    ||
    |

    If you make your option tags look like
    |
    <option value="{{person.person_id}}">{{person.name
    <http://person.name>}}</option>
    |

    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 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 anyone had any experience on how I can accomplish this?

        Thanks.

-- You received this message because you are subscribed to the
    Google Groups "Django users" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to django-users...@googlegroups.com <javascript:>.
    To post to this group, send email to django...@googlegroups.com
    <javascript:>.
    Visit this group at https://groups.google.com/group/django-users
    <https://groups.google.com/group/django-users>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/django-users/bd054ed4-8761-415d-adaf-07bfc144956d%40googlegroups.com
    
<https://groups.google.com/d/msgid/django-users/bd054ed4-8761-415d-adaf-07bfc144956d%40googlegroups.com?utm_medium=email&utm_source=footer>.
    For more options, visit https://groups.google.com/d/optout
    <https://groups.google.com/d/optout>.

--
You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com <mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com <mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d7e93f6a-e3bd-40eb-8d3b-bc74f9358347%40googlegroups.com <https://groups.google.com/d/msgid/django-users/d7e93f6a-e3bd-40eb-8d3b-bc74f9358347%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9a113717-f500-b70b-adbe-228b508d5470%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to