0

Filtering subtables

Hello I was wondering if it was possible to filter a price with a subtable.

I have a table with a lits of different countries and a subtable with the weight and each weight has different prices depending on the courier used.

I would like to retrieve the price of a company for a specific weight.

I tried things like " Shipping-Cost.Price-DHL where Shipping-Cost.weight= Product-shipping-weight "but I don't seem to be getting anywhere.

Any ideas? Thanks!

Charlotte

6 replies

null
    • Fred
    • 3 yrs ago
    • Reported - view

    Hi Charlotte -

    It can help if we have a little better understanding of the relationships of the tables in question. What table are you in and what kind of relations (1:1 or 1:N) to the Shipping-Cost table does it have?

    Thanks,

    • contact
    • 3 yrs ago
    • Reported - view

    Hello, thank you for your time Fred!

    I have an inventory which is linked to a destination table (1:1 I guess) which itself has a subtable (1:N?) with different weight possibilities and the price of shipping for different carriers (price 1, price 2, price 3) for example  1k - 10€ - 15€ -20€; 2k- 15€ - 20€ -25€ etc.

    There are 11 shipping zones with each 8 weight possibilities.

    In the inventory I have a shipping-weight field that I would like to use to get the shipping prices for every zone. Screen captures attached (sorry for the mess I have been trying many things and have not cleaned it yet!)

    Hope I have answered your question,

    )Capture d’écran 2021-03-16 à 17.37.15Capture d’écran 2021-03-16 à 17.44.49

    • Fred
    • 3 yrs ago
    • Reported - view

    Ok, just a few more questions.

    1) The first screenshot is of a record in your Inventory table? Or is it a dashboard?

    2) In the first screenshot is that Tarifs table a view? If so then what table are you looking into?

    3) You say, "In the inventory I have a shipping-weight field that I would like to use to get the shipping prices for every zone.". My question, maybe I'm not thinking clearly, is why would you want all of your shipping prices for all zones into one field? Wouldn't the shipping-weight field be a simple number (1kg, 100kg, etc)? Also why would you want to see shipping prices in Inventory? Wouldn't you want to see it in Invoicing or wherever you figure out pricing to charge someone?

    • contact
    • 3 yrs ago
    • Reported - view

    The first screenshot is a record in my destination table (sorry it's in French!) with the view of its subtable "TARIFS". 

    The shipping weight field in my inventory is indeed a simple number which matches one number in the subtable 'Tarifs'.

    When I put my products online I have to be able to announce the shipping fees before they are actually sold, that's why it's on the inventory side and not on on the invoicing side.

    I just want to relate each product to the correct shipping profile. But maybe I organized it wrong maybe I should have listed the weight first and then the zones?

    Below a screen capture of a record in the inventory.Capture d’écran 2021-03-16 à 18.27.24

    • Fred
    • 3 yrs ago
    • Reported - view

    Very helpful info.

    As with any database, more questions.

    1) Is a single shipping cost really related to a single record in your inventory? Doesn't a record in your inventory have many shipping cost options depending on zone. Does each record in Inventory exist one time and when sold becomes obsolete?

    2) I can't get into the web side of things, but it seems like you need an Order or Quote table that gets the item from Inventory, gets the shipping address which then figures out which Zone from your destination table and then figures out the shipping cost based on the weight of the item. Then the Order or Quote either gets deleted or becomes an Invoice. If you don't have a lot people getting only quotes (say less than 10%) then maybe you can just use the Invoice table with a field that marks it as a quote or something like that.

    Again, just my 2 cents worth of blabber. Maybe I'm missing something and overthinking it.

    • Alain_Fontaine
    • 3 yrs ago
    • Reported - view

    Just a hint without analysing the complete database structure. In your formula, what does "Product-shipping-weight" stand for? If it is the name of a field from another table than the one linked by "Shipping-Cost.Price-DHL", the formula won't work. The reason is that the condition is evaluated in the context of, in turn, each record of the linked table. Fields from any other table are out of reach. So, if you need to compare a field of the linked table with a field from any other table, you must save the value of that field in a variable before performing the filtering, and use the variable in the condition.

Content aside

  • 3 yrs agoLast active
  • 6Replies
  • 586Views