I have 2 tables in my app. One is an inventory table with a master data list of SKU details, cost, selling price, etc.
Another table I have is a “SKU pricing scale”. This scale table has few fields: Min, Max, Markup %.
Different price ranges have different markups (e.g. $0-500 = 25% markup, $500-1000 = 20% markup, and so on.)
I’m trying to get the master data list table to dynamically update the “selling price” field depending on where the cost of each SKU falls into the different pricing scale ranges.
Can someone help me with this. I hope what I described makes sense
You can probably create a pipe to do this using the Tadabase API.
You’d basically query this table via the API and then filter it to find values that are higher than the min and lower than the max. You’d then get the value back and use that in your next step.
If you create a basic app with this example and share it with me (moe@ tadabase .io) I’d be happy to build out the pipe for you on video so you can see what I mean.
Thanks. While testing this out I found that we’re missing an operator (“Greater than or equal to” and “Less than or equal to”) in the filter options. We need to add this to make it work, we’ll have this done soon.
Here’s a video demonstrating how to do this with a pipe. I wish it was simpler, but hopefully this can help for now.
Main issue with this which is still being worked on is that if the value falls on an exact number in the max or min field it will not work. For that we need an operator that is “higher than or equal to” and “lower than or equal to”
So I sent you a video regarding decimal values not passing through the API filters.
And one other question I had - is there a way to connect the two tables in such a way that when any of the scales change, the master table would get the updated selling price right away. All SKUs that fall within the updated scale margin, would get updated. Vice versa, if I update a SKU record in the sku table, I can create a table rule “created or edited” to automatically pull in the correct scale at that moment.
I’m curious if there’s a way to make these two tables “sticky” and have the scale always push.
@moe The new operator works great! You guys are fast! I really appreciate it.
Quick question. I have an annoying validation popup for some reason even though my values are correct and go through. here is a video:
it actually doesn’t show it as well here but basically the number value form shows a validation message: please enter a valid value. the nearest are 1 and 2
is there a way I can remove that, maybe CSS but I couldn’t find the selector