Import picture based on field value

Viewing 2 reply threads
  • Author
    Posts
  • December 21, 2020 at 6:49 PM #42933

    Chris Klein
    Participant

    Hi folks, is this possible?:

    I am using Tap Forms for my astronomy hobby.

    Every object in the sky lives in a constellation. Think of the constellations as the 50 states.

    I have a record of an object I want to observe with my telescope.
    In this form I also I have a field of which constellation this object lives in. (see attached)

    Can Tap Forms automatically populate a picture field of the constellation’s chart based on which constellation I’ve chosen in the field?

    Attachments:
    You must be logged in to view attached files.
    December 21, 2020 at 7:27 PM #42935

    Chris Klein
    Participant

    *****IGNORE*****THIS******POST*******

    I figured out a better way with related fields.

    December 22, 2020 at 1:28 AM #42940

    Brendan
    Keymaster

    Hi Chris,

    That’s a cool use for Tap Forms!

    I took astronomy in university. It was one of my favourite courses.

    Although you’ve figured out another way to do what you want, your original question could be answered with a script to fetch an image from somewhere and populate the image in your form. If you had a folder on disk with photos in it, you could write a script to add a photo to your field from a URL using record.addPhotoFromUrlToField(url, field_id); You could set the photo field empty before adding a photo to it, otherwise you’d get multiple photos in the field.

    Anyway, just thought I’d chime in with this bit.

    Thanks!

    Brendan

Viewing 2 reply threads

You must be logged in to reply to this topic.