Answered
Is there a way to make a required one-or-the-other field? For instance, on an app if I need a technician to enter a part number I have a short text field, but also a photo field for them to take a photo of the part number on the box. Having a part number is required for our information, but I only need one or the other.
1
Comments
Please sign in to leave a comment.
Sounds like you need to use conditional logic fields.
You can add instruction to your app by adding a static text fields that says something like "You need to enter or take a photo of the part no. Select which method you prefer in the drop down below."
Then have a drop down list with "enter manually" or "take photo".
After the drop down, add a short text field labeled "Part No." and another photo capture field labeled "Part No."
Then add conditional logic to both so only the method the user chooses will appear.
Note: If you intend on using dispatch capability, you will need to provide an export labels for the fields to avoid confusing the computer. Computers cannot sort out the information if you have two fields with the same name.
See the photos for examples of the screens.
In the Help Center advanced app builder forum, see the advanced app builder topic "How to add conditional branching". Towards the bottom of the screen there is a section for conditional fields and also a video.
https://help.gocanvas.com/hc/en-us/articles/231963587-How-to-add-conditional-branching
Nailed it, Keith. Thanks!
I actually already thought about doing it that way and have done similar things in other apps. I was more wondering if there was a way to set up some type of condition for required fields. Basically a way to group 2 or more fields together and then state that at least one response to the group of fields is required.
Hi Chad,
I just wanted to confirm that Keith's solution using Field Conditions would be the way to accomplish this for the time being, and to thank you for the feedback on conditional functionality specific to required fields. The situation you are describing is likely not uncommon for users to encounter and could certainly benefit from more simplified setup!
Thanks,
Siobhan
I've been thinking about this. In my case, I have two identifiers, an asset number and a serial number, either one of which will positively identify an object. Best case, I'd have two required fields where an entry in one will hide the other. If both entries were made, there's a chance that they would point to different objects & then there would be no way to tell which is correct.
I suppose that one field could hold either the serial number or the asset number, but different data types in the same field makes the back of my neck itch.