Unable to get dependant dropdowns to properly work

Hi,

I have been trying for the last 3 hours (youtube videos, online documentation) to have in a form
the business names in a chosen city appear in a dropdown select box depending on which city the user picked previously also in a dropdown select box.

Screenshot 1: https://ibb.co/4YT7ckp

Screenshot 2 [ My table (โ€œRATEโ€) with the relevant fields ] : https://ibb.co/f0rWshg

(note: I tried all field types for the two fields : ENUM, LIST, TEXT , etc etc โ€ฆ )

Screenshot 3 (The design of the first dropdown select box): https ://ibb.co/B2xhMqg

(note: here as well, I tried all field types)

Screenshot 4 (The design of the second dependant dropdown select box): https ://ibb.co/kJf3q13

(note: here as well, I tried all field types)

Through all my attempts, the list of cities and business names never show up in the form. Actually, the two fields completely disappear from the form.

Could someone give me a step by step guide ? I am completely lost as of now.

Thank you for your time.

Rgds,

KBW

0 28 1,030
28 REPLIES 28

@Kami_Barut
Your screenshot3 and 4 images are completely missing so itโ€™s too hard to understand its content and where you are mistaken. Can you please fix it so that we can check?

@LeventK
Thanks for your answer.
Appsheet forum only lets you include two url links within one post.
The workaround I used for Screenshot 3 url link and Screenshot 4 url link was to include
an empty space between the โ€œsโ€ from โ€œhttpsโ€ and the semicolon.
The correct url links are:
Screenshot 3: https://ibb.co/B2xhMqg
Screenshot 4: https://ibb.co/kJf3q13

Thanks for your time.

KBW

@Kami_Barut
Use below expression for your [City] column

SELECT(RATE[City],TRUE,TRUE)

Use below expression for your [Hairdresser Business Name] column

SELECT(RATE[Hairdresser Business Name],[City]=[_THISROW].[City])

@LeventK
Thanks.
Do the column data types for City and Hairdresser Business Name remain โ€˜Textโ€™ ?
(as on screenshot 3 and screenshot 4)

@Kami_Barut
Correct. They can remain as Text

@LeventK
It is not working, you can see on screenshot 5 that the two fields are entirely skipped in the form.
Screenshot 5 : https://ibb.co/6sWrvTJ
I added:
a) SELECT(RATE[City],TRUE,TRUE) in the section DATA VALIDITY -> Valid If input field of the City column.
b) SELECT(RATE[Hairdresser Business Name],[City]=[_THISROW].[City]) in the section DATA VALIDITY -> Valid If input field of the Hairdresser Business Name column.

@Kami_Barut
May I ask are you trying to read the drowdown values from the same table that you are creating records??

@LeventK
Actually, yes. It may have been a misunderstanding from my part on how to display form fields and collect form entries.
What is the correct approach ?

@Kami_Barut
Instead of Valid_if try using Suggested_Values property instead. But I may advise moving those City and Business names to a separate table and read those dropdown values from that table thru Valid_if

Should I create a different table with just those two columns filled with all cities in the City column and hairdresser business names in a Hairdresser Business Name column and refer to that new table in the sections DATA VALIDITY -> Valid if input field inside the RATE table ?

Hi,

I must be doing something wrong.

  1. I created a new table called LOCATION containing all cities and every business name tied to each specific city.

Screenshot 6: https://ibb.co/56Cqs94

  1. In the table RATE, I added in the City column
SELECT(LOCATION[City],TRUE,TRUE)

In the Hairdresser Business Name column, I added:

SELECT(LOCATION[Hairdresser Business Name],[City]=[_THISROW].[City])

The form is shown but completely skips the City and Hairdresser Business Name columns, i.e: screenshot 5.

Any ideas ?

Thanks.

KBW

@Kami_Barut
Are you using a slice? If so, ensure that those columns are included in your slice. Also can you please check the Show_if of those columns in case they had unintentionally been switched off?

@LeventK

  1. Is it mandatory to use a slice to show a simple form with select dropdown options ?
  2. For your second remark, I am a bit confused. Do you mean Show_if in the UX for my form view ? (Screenshot 7 here: https://ibb.co/mS54Lzt ) It is empty but the entire form is shown.
    For the Location table, the City and Hairdresser Business Name fields SHOW? checkboxes are checked.

@Kami_Barut
1.) Itโ€™s not mandatory to use a slice
2.) Iโ€™ve mentioned the Show property in the Column structure


Check them not in your LOCATION table but in your RATE table instead

@LeventK,

  1. Then I wonโ€™t use a slice for my form.
  2. Every single column name in the RATE table (as well as in the LOCATION table) which needs to appear in the form has the property Show? checked, i.e: ON.

@Kami_Barut
Provided you can share your app with levent@able3ventures.com email with co-author status I can check it for you

@LeventK,
Sure, give me just a bit of time tonight (I am currently looking at the doc, this is my first app) and Iโ€™ll give you co-author status.

I really appreciate your patience and energy.

Thanks.

KBW

Youโ€™re welcome

Hi,
I believe you should have received the invitation by now.
I can be contacted anytime at : kamibarut@yahoo.com
Rgds,
KBW

@Kami_Barut
In your Rate table, the key column is the [Hairdresser Business Name] where you are trying to create a dependancy, and the table is set to accept ALL_CHANGES as well. It will not work this way. You shall add an i.e. [ID] column and assign an Initial Value of UNIQUEID() and set it as the key column. Then it will work.

Besides your Register table is using the _RowNumber as the Key column which is not appropriate at all. Provided 2 users try to create/update/delete any record at the same time, the latest record will prevail in the database. You shall change this and add an appropriate key column to this table as well like I have described above. The editor already prompts you as such:

@LeventK
Hi,

  1. The good news: the register form works (but this form does not have dependant dropdowns.)
  2. The bad news:
  • I added a PRIMARY KEY column in my Rate table.
  • If I look at the syntax of the UNIQUE() function you suggested in โ€œExpression Assistant Initial Value formula for column PRIMARY KEY (Text)โ€, it says:

UNIQUE(LIST(value1, value2))

What am I supposed to put in LIST ? Should I add myself in my spreadsheet RATE in the column PRIMARY KEY numbers from 1 to 66 and then list them for value1, value2, etc โ€ฆ ?

Are you sure you did not mean function UNIQUEID() ?

KBW

@Kami_Barut
It should be UNIQUEID(), itโ€™s my bad, sorryโ€ฆEdited my response as wellโ€ฆ

@ LeventK,

screenshot A: https://ibb.co/D9Yk4tn
screenshot B: https://ibb.co/mNpm078
screenshot c:

I think we are doing something fundamentally wrong.

KBW

@Kami_Barut
Can you please share the gSheet as well? Thnx

@LeventK
You should have access to the entire spreadsheet now.
Thanks.

@Kami_Barut
Problem solved. The issue was for all the tables, your primary key column was empty. Therefore the expression cannot return a result from the table.

@LeventK
Youโ€™re right, it seems to be working.
(Iโ€™ll do a few tests here and there just to be sure.)

I am extremely grateful for your help.

Thank you.

KBW

Youโ€™re welcome

Top Labels in this Space