select price according to a button

Hello friends, I hope you can help me with this issue that I have since I am new to appsheet.
I am designing an app as a test where I have in one part an inventory of products with a retail price and another with a wholesale price, so far the function of entering the data to be saved in the INVENTORY sheet works well.
Now in my SALES app I put a dropdown with the WHOLESALE and RETAIL values, what I want to do is that when selecting any of these 2 options, the PRICE field will place the price that corresponds to WHOLESALE or RETAIL from the INVENTORY sheet. How can I do this? I already have many days looking for information and many tests and I can not do it.
In other programming, I did it with IF comparisons.
Thank you very much and a big hug to all.

0 4 151
  • UX
4 REPLIES 4

Hello @Bajio_Flyers , welcome to the appsheet community !

So you have a list of products with 2 possible prices depending on the case (wholesome or retail), those prices are stored in different columns of the same table, or are they split in different ones?

Does your sales table have a reference to your inventory table?

A screenshot of each table would answer all my questions too hehe, so i can help you build the expression.

Thank you very much for your answer and your time, these are the screenshots of the tables. The first is the SALES table and the second is INVENTORY.

When programming the SALES format I refer to the INVENTORY table placing all the products in a dropdown to select one, in the screenshot of the format are the buttons โ€œWHOLESALEโ€ (wholesale) and โ€œRETAILโ€ (retail) I select any of these 2 and in โ€œPRICEโ€ (price) I put the corresponding value according to the INVENTORY table.

Thank you very much for your help and a hug.

Top Labels in this Space