Hello,
Iโm new at appsheet and on my first attempt to create an app I already big (at least for my skillsโฆ).
My app has a nested form with four tables.
PARENT FORM
CHILD FORM
COMPANIES
EXPENSES
In the parent form which company is selected through a dependent drop-down list (Region - County - Company based on values in Table โCompaniesโ)
In the child form is the expense submition. Here I would like to based on the country selected in Parent Form, to build a dependent drop-down list for the expenses (Country - Expense Category - Expense Type, based on the information in โExpensesโ table.
Is this possible?
I suppose itโs great that several users such as miself without much knowledge on Appsheet or programming see the potential in this tool to aim for the Pulitzer Price.
As I mentioned, Iโm a beginner so I wasnโt really sure what to look for and therefore Iโve asked thatโs what community are for.
Before posting Iโve searched and re-searched based on my need and not on technical stuff which I was unaware of.
We recently gained the ability to use chained de-refs, So Iโm going to try and use those, but the following is not tested.
I assume you have a [Country] column selection in the parent table, and your first selection in the child table will be the [Expense Category]. In this case, set a valid_if expression for the [Expense Category] column, similar to:
SELECT( Expenses[Expense Category] , [Country] = [_THISROW].[Parent Ref].[Country] )
Thank you very much for the advise. I will try it tomorrow. I let you know If it worked and in case Iโll need to make some readjustment Iโll provide with the solution based on your guidance.
Hello Marc,
Once again, Iโm thankfull for you help.
I readjusted the name of columns and tables accordingly as follows:
โSELECT(Accounting Information[Expense Category] , [Country] = [_THISROW].[Request Number].[Country of Company] )โ
This raised another question which is the selection of the Expense Type which should be dependable of the Expense Category.
Iโve tried applying the same logic, but it didnโt worked.
Logic:
Form 1 (Parent): Region > Country > Company
Nested Form 2 (Chlid) Country (previously selected) > Expense Category > Expense Type
I was thinking that in Form2 Table I could add a Column โCountryโ that would be automatically populated upon the selection of Country in Form 1 using Initial values, then follow with the Normal Depend Dropdown List logic (โForm2[Country], Form2[Expense Category], Form2[Expense type]โ)
I most often try to avoid Appsheetโs automatic dependent dropdown functionality. Thatโs just a personal preference, I find it a bitโฆfiddly?..maybe presumptive?
But sure, you could do that by adding a [Country] column to your child table, which auto-populates from the parentโs [Country]. Then you wouldnโt use the SELECT() expression from my first post.
Or, you donโt need to redundantly copy that data. For the next column [Expense Type], you can set a valid_if expression similar to my first SELECT() expression. How do you think you would modify that to achieve what you need? To filter the Types by the previously selected category (also maybe AND the Country again, depending on your needs).
Iโve went for option Two by creating an extra column in Child Form Table.
Iโve tried so many things, that in fact I no longer know what exactly Iโve done to make it work.
Tomorrow Iโll start to make version 2 from scratch. Hopefully I will better understand what Iโm doing.l and Iโll leave the solution here in case itโs useful to someone.
Ok, so Iโve build the version 2 of my app with Dependent Dropdow List in Nested Form.
Tables:
Expense (Parent)
Receipt (Child)
List of Country (Containing Region, Country, Company)
Accounting Information (Containing Country, Expense Category, Expense Type)
My objective was to have the correspondet Expense Category in Child based on the Country selected in the Parent.
I got this by creating a Country Column in the Child.
For this Column which is set as Text, I have in initial value formula โ[_THISROW].[Expense].[Country]โ then a Valid If โAccounting Information[Country]โ
@Marc_Dillon once again, Thank YOU!!! Although I didnโt used your solution, your solution/feedback not only unblocked this for me but also made understand a little bit better APPHEET behaviour. Iโm really appreciated.
Great! Glad to help, and glad youโve got a fuller understanding.
User | Count |
---|---|
18 | |
9 | |
8 | |
5 | |
5 |