Jump to content

Value list with fixed/variable value combination


Recommended Posts

Hi,

I'm creating a dropdownlist where the user can choose between different units.
The user should be able to choose between the general unit being "PCS"  or the sub-unit (could be gr, kg, boxes etc..) which is mentioned in another field of the record. Main idea behind this is that the user has the freedom to be able to select the full quantity of a record or a smaller quantities in logical units.

 Lets say one PCS = 10 boxes (instead of for example 0,2 PCS the user can enter 2 boxes).

So I want to create a dropdown value list based on a combination of two sources:

- 1 fixed value, which is always the same (in my case it is value "PCS")
- 1 value based on the sub-unit mentioned in another field in the same table (in this case this could be one of these values "GR", "KG", "BOXES"...)

Example:
Database table "Stock" has two fields named "Sub_unit" and "Chosen_unit"
A dropdown is needed for "Chosen_unit" containing 2 values: "PCS" (= the fixed value) and value from "Sub_unit" being "BOXES"

Can anyone help me to create this value list?

Best regards,
Solvax

Edited by Solvax
clarification
Link to post
Share on other sites
1 hour ago, bcooney said:

Please post your problem with less abstract descriptions. 

Hi bcooney, I understand. I tried to make my post more specific. Thanks for pointing that out.

Link to post
Share on other sites

This is much better. Now, what is the workflow? When is “user has the freedom to be able to select the full quantity of a record or a smaller quantities in logical units“. What are they doing? Creating an order?

Link to post
Share on other sites
10 hours ago, bcooney said:

This is much better. Now, what is the workflow? When is “user has the freedom to be able to select the full quantity of a record or a smaller quantities in logical units“. What are they doing? Creating an order?

The workflow is the following:

1) a delivery note indicating the quantity (eg. 1 PCS) and subquantity (eg. 10 boxes) is imported in the stock table (where 1 PCS could be 1 pallet as standard quantity for example) upon delivery of the goods. The delivery units are predefined by the supplier.

2) the user can then allocate the quantity to a customer, in case we are talking about full units (PCS or in this case as example pallets) the user can select PCS, else the user selects the defined subquantity in BOXES (eg. 8 boxes). The goal of this dropdown choice is user friendlyness, meaning the user does not have to calculate the main unit in case we are talking about a subquantity, this will be done in the next step by a script. On the other hand the value list is important as well to force the user to choose between the right main unit (PCS) or sub unit which is predefined by the supplier.

3) the stock table gets updated in two fields (main quantity and subquantity) and the outgoing product transaction is booked.

Hope this is clear enough.
 

Edited by Solvax
Link to post
Share on other sites

I’d use a radio button, PCS or sub quantity above the qty field. If sub quantity is chosen, reveal drop down of sub quantity type. Use the radio button choice to drive the math needed in the inventory transaction. 

Link to post
Share on other sites
6 hours ago, bcooney said:

I’d use a radio button, PCS or sub quantity above the qty field. If sub quantity is chosen, reveal drop down of sub quantity type. Use the radio button choice to drive the math needed in the inventory transaction. 

Thank you, I think that will be the most elegant solution. Your help is much appreciated.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.