Hello fellow Corvid coders
I’m in to abit of a technical problem, and running out of solution ideas.
I’m creating a nearly finished web tool, a proces work flow ‘you can call’ across three databases.
And the key fokus of using this tool created for my customer is simplicity at highest level, creating new order with only two action ‘pick and click’
The three databases are described as following-
-
Warehouse static pick with occasional product information being changed etc.
Informations are here being copied to an proces order. -
Processing and adding additional info etc. ‘Cache Database’
After processing the specified order that were copied from warehouse pick, and approved it will be copied ones again to the final database and deleted from the corrent database. -
Record database
As described, storage of the final order and path data.
Problem
While doing this method, we are copying everything, right from the start process of picking products and that’s fine…But however,
the ID is also coming across the cache database, and stored in the record base.
Here starts the problem.
While making a new order from the same warehouse and finishing proces, trying to store the order in record database will not go through because of the conflict with storing new data line with same ID.
Do any one know if we can code around this or worst, reconstructing the whole set up?
We are currently going around this by manual creating new order via cache database , but having people typing in manually proves a lot of wrong info are being insert to the order.
The copy code etc.
We are using is stated as followed:
import wixLocation from 'wix-location';
import wixData from 'wix-data';
export function button_onclick(event, $w) {
$w('#text31').show();
let toInsert = $w("#dataset1").getCurrentItem();
wixData.insert("procesdataset", toInsert)
.then( (results) => {
console.log("done adding item")
wixLocation.to("Hidden U R L");
} )
.catch( (err) => {
let errorMsg = err;
} );
}
Bonus help, I’m trying to figuring another solution about a smart and quick rearrange method nearly alike ‘drag & move’ on table in the proces cache, as the supervisor can move an order up the queue in proces.
Would like to thanks any comments on this in forward.