Search drop-down with code and description but store only code

Hi

I have a field that stores an item code. To create the drop down, in the Valid If I have

Select(StockList[Item_Code], true)

Although this works fine, if the user tries to search for the item with its description, it does not work.

How can I fix this, please?

Solved Solved
0 10 191
1 ACCEPTED SOLUTION

You would need to use either Enum (base type of Ref) or Ref column type. Additional, you need to add a column where you concatenate these those columns together something like [Item_Code]&" - "&[Description] in your source table and set this new column as a label. Then it's possible.

View solution in original post

10 REPLIES 10

What column type are you using with the "Item_Code"?

Both fields are of text type.

StephenSaid_0-1696834137073.png

 

 

@AleksiAlkio 

When the user clicks on the Item Code field, he can search for the item.

I need the user to be able to search for the item using both code and description.

StephenSaid_0-1696885878232.png

StephenSaid_2-1696885898022.png

Is this possible?

You would need to use either Enum (base type of Ref) or Ref column type. Additional, you need to add a column where you concatenate these those columns together something like [Item_Code]&" - "&[Description] in your source table and set this new column as a label. Then it's possible.

@AleksiAlkio 

Thanks. I'll have a look at this solution and revert, hopefully this evening.

You're welcome!

@AleksiAlkio 

This is what I've got.

This is the StockList table. I've added a virtual column to include both code and name and marked it as Label.

StephenSaid_0-1697045288213.png

In the Transfers table, I updated as follows. Unfortunately, I had to Allow other values which is not what I want. But this might be a small price to pay!

StephenSaid_2-1697045410789.png

When I click on the field, I get a blank list!

StephenSaid_3-1697045452398.png

If I select Auto-complete other values, I get four items in the list. These items are items which are on other transfers in the Transfers table. This is not the behaviour I need. Maybe I'm doing something wrong need to do something else.

StephenSaid_4-1697045658012.png

I really appreciate your input.

 

 

 

You need to add a formula to Suggested values to read the list of key values.

@AleksiAlkio 

Love it. Thanks

 

You're welcome!

Top Labels in this Space