Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Posts
    2

    Unanswered: conditional script?

    Hello all,
    I need to make an item price field that is automatically filled in when an item number is selected from a list.
    Example, when selecting Part123 from the item number list then item price field should update to $10. But change the item to Part345 then the price field should update to $20. I need to make this work for at least 80 items but be able to add more later.
    Your help is greatly appreciated.
    Darrel

  2. #2
    Join Date
    Sep 2003
    Location
    Cincinnati, Oh USA
    Posts
    203

    Re: conditional script?

    There are a couple ways you can do this. Either by 'if' statements or 'case' statements. But let's do the 'if' route.
    First the field that contains the Item Description, make this a list box and populate it from a value list. Then your Item Price field would be a calculating field, with it's results as a number.
    It would be something like this:

    If(ItemDescription = "Widgets","2.99",
    If(ItemDescription = "Sprokets, "1.75",
    If(ItemDescription = "Spokes", "4.35","")))

    In the layout format the item price field number as currency.
    You can add up to 255 line statements. Using the value list to define your description field is to make sure that your description text remains the same.

    You can add more items, as needed, into your description field value list and simlpy add the items in the If statements calculation.

    Good Luck




    Originally posted by tykesplace
    Hello all,
    I need to make an item price field that is automatically filled in when an item number is selected from a list.
    Example, when selecting Part123 from the item number list then item price field should update to $10. But change the item to Part345 then the price field should update to $20. I need to make this work for at least 80 items but be able to add more later.
    Your help is greatly appreciated.
    Darrel
    Last edited by RickKnight; 12-10-03 at 15:13.
    Rick Knight
    KnightShift Office Solutions and Horse Breaking
    VB, VBA, FileMaker, Access Solutions, Web Solutions

  3. #3
    Join Date
    Dec 2003
    Posts
    2
    That worked exactly as I needed.
    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •