I would like to create an enum list, however ...

ux
(Nick Parsons) #1

I would like to create an enum list, however the list is quite long.

Is there a way to have a drop down that takes the value from another table I have within the app?

(Nick Parsons) #2

@Suvrutt_Gurjar ok, basically I have people who work in departments.

So, using the valid if in the other fields as I did, each one following the other, the selections are logically made based on the previous field data.

However, the link stops when I get to person.

The people are located in a seperate table.

I see using the valid if as you say will look to numerous tables but how will i link the person to the previousley selected department for example in the previous fields in the form?

Thanks again for all your help here…

(Suvrutt Gurjar) #3

Basically the article says that one of the ways for creating drop downs is, you can create a drop down from other table by putting the expression LookupTable[ColumnC] in the valid_if constraint of the drop down column.

(Nick Parsons) #4

@Suvrutt_Gurjar Perfect, thank you so much…so easy too…

(Suvrutt Gurjar) #5

Good to know the option works for you @Nick_Parsons1.

(Nick Parsons) #6

@Suvrutt_Gurjar One other option I need which I seem to have become stuck with is that I know have to select a person, however, the people are in a different table.They are allocated to locations but in a different table, is this possible at all?

(Suvrutt Gurjar) #7

Hi @Nick_Parsons1,I think proper solution will need more details to know about the app data structure etc…

I request you to get in touch with support@appsheet.com for more specific help.

(Nick Parsons) #8

@Suvrutt_Gurjar Thank you, this looks like the solution im looking for, I have tried the expression and it verified, howeve I receive a NaN error?

(Suvrutt Gurjar) #9

Hi @Nick_Parsons1, I request you to look into TEST mode after VERIFY step

where the error is throwing up.

Hope you have included the reffered table into the App

Also please ensure both the referred and drop down column are of same type.

(Nick Parsons) #10

@Suvrutt_Gurjar The reason for the error was that in the lookup table, the field was set to number and needed to be text…thank you.

(Suvrutt Gurjar) #11

Good to know it got working. Thank you for update @Nick_Parsons1

(Nick Parsons) #12

@Suvrutt_Gurjar very strangely its stopped working, its not even showing the field on the app now!!

Is it possible to have this valid if on two different fields? so two fields can produce drop downs from another table?

(Suvrutt Gurjar) #13

Hi @Nick_Parsons1, May I request you to let us know, if you are trying to create 2 drop down fields from 2 different but adjacent columns in the lookup table?

Or are you trying to create one dropdown column by referring 2 different columns in the lookup table?

(Nick Parsons) #14

I am trying to create Two dropdowns from 2 different columns in the same lookup table.

However, Thinking about it, If I can select from one drop down list and have 2 other fields auto populate based on the selection, that would work better!

(Suvrutt Gurjar) #15

Hi @Nick_Parsons1 Ok got it,

thank you. Based on your description, there is another option that you may wish to take a look at ( if instead of auto populating you wish users to enter other two fields as well but based on previous drop down selections)

help.appsheet.com - Dependent Dropdown Dependent Dropdown help.appsheet.com

(Suvrutt Gurjar) #16

Hi @Nick_Parsons1, Based on my understanding you wish to have a drop down for selecting persons. However these persons are in different locations in different tables.

In that case you can use the following expression in the Valid_if of the drop down column wherein you wish to select persons collated from various locations in various tables.

Location1[Persons1]+Location2[Persons2]…+LocationN[PersonsN]

where Location1, Location2, Location3…LocationN are various location table names and Persons1,Persons2, Persons3…PersonsN are respective columns in those tables that contain person names.

Hope this helps.

(Suvrutt Gurjar) #17

Hi @Nick_Parsons1, I request you to take a look at the following article

help.appsheet.com - Dropdown from Valid_If Dropdown from Valid_If help.appsheet.com