How do i auto populate a field/value based on the dropdown?

I have a dropwdown menu that shows the value after the user selects the field in the dropdown menu. However, i do not want the user to then have to click the value shown:

Before the user has chosen value from dropdown menu:

After the user has chosen the value from the dropdown menu:

I do not want the user to have to click (4324) from my example above. I wan that value to automatically be chosen

You could use a virtual Column for the GL Code and a formula with a Lookup function?

Also looks like your reference in the Category is broken

2 Likes

I am not sure why the category is not referencing - because it seems to be fine.

As for the Lookup expression - what would it look like?

If a category returns only one GL code, then put Appformula for the GL code column. It will work in this case.

1 Like

This is how it works at the moment. It does show the correct GL Code, but i was wondering if i can make it already select that GL code, instead of the user having to click on it:

Use the Initial value expression.

Thanks Steve - but if the user chooses a different “category” how will that affect the initial value expression?

I guess i am misunderstanding how to show the value of the GL code based on the Category selected. I thought Initial Value sets the value no matter what Category is chosen.

The Initial value will continually update until the user manually adjusts its value. Please read the help doc.

1 Like

Ok. I see. now i put the formula in the Initial value:

This is the result when i choose any category (seems to just show ALL possible GL Codes):

Steve,
Do you think maybe my table structure for the second table “GL Code Table” is wrongly set up?

Not at all. I’m not surprised by the result you get–we need a better expression.\

But first!

This needs to be fixed:
image

The yellow triangle means the Category column is of type Ref, but the column’s value, RENTAL PARTS, is not a valid Ref-type value. I feel like we’ve gad to deal with problem previously…

Ok. Here is the Table [Category] - refernces:

“GL Code Table”:

Please post a screenshot of the Category column configuration that includes at least the Valid If expression.

1 Like
  1. For the Category column, set Type to Text.

  2. For the GL Code column set the Initial value expression to:

    LOOKUP([_THISROW].[Category], "GL CODE TABLE", "Category", "GL CODE")
    
1 Like

Steve,
Once again…

You have helped me out so much - i feel like i owe you a beer!

Thx again.

1 Like

Happy to help!

:slight_smile:

1 Like