Jump to content
  • 0

Display data depending on what I picked in a drop down field


Anatol

Question

Hello everyone,

I started using Caspio only a couple of days ago. As a first test project I am trying to build an invoicing app. I am now facing a problem and I really hope that someone here can help me.

Before generating a new invoice, I need to enter all data for it. Customers I pick from a drop down, invoice date from the date picker etc. That is all fine. Now I select the Service I am sending the invoice for. (Let’s assume it’s only one service in the invoice.) This is another dropdown and refers to a table with, let’s say, the following content

ID           SERVICE                              PRICE

1             Accounting                        100

2             Consulting                          120

3             Training                               140

In my data page I pick the service from a dropdown, display and value are both set to the 2nd column shown above. I pick Consulting, Consulting is displayed. The problem is, I need the price to show up somewhere so I can later calculate the invoice overall sum with it.

I know I could insert a 2nd dropdown with SERVICE as display and PRICE as value, but I don’t want to drop down twice. So here is my question: How can I, in my data page, display the price (col. 3) of the service (col. 2) that I just picked in the drop down field?

(By the way, the same solution will help me to, in the next phase, display the customer’s address in the printable invoice page, after I selected the customer’s name from a drop down. Same thing I guess.)

Thank you very much in advance. I am looking forward to receiving your posts.

Anatol

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...