I am getting data from a production website using APIs andi want to know if there is a simple method that i can use to get informations from one column. In fact, normally, the original data has the form :
N°23:BrandName - ModelName, Diamètre - 4.0 & Longueur - 10.0 for one product and if we have many products, we will use | delimiter to separate each product data. For example :
23:BrandName - ModelName, Diamètre - 4.0 & Longueur - 10.0 | 24:BrandName2 - ModelName2, Diamètre - 4.1 & Longueur - 8.0
So, i want to know if there is a simple way to get the different informations of the table column (the number, the brandname, the modelname, the diametre, longueur) of each product and why not create an other table using the product number and which will have all of these datas columns?
Hey @FahdERM -
Only 1 part of this isn’t (easily) possible. That is automatically creating the table. With a table in place is is possible though.
Take the list of models and split them into each list item.
Using the library looping widget, go through each element
Looper Unit Test | Frontline Operations Platform
Find the - and , around the model name
Remove everything until after the model name (so we dont match 24: as a number)
Run a regex match to extract all of the numbers
Assign each element to a variable
Create a record and store those variables to it (after casting to numbers)
Hope this helps:
Thank you for your post. I have tested it and it worked very well except extracting diameter and Longeur. In fact for these entries :
48:BIOMET 3i - T3 Non platform Switched Parallel Walled Certain, Diamètre - Ø3.26 & Longueur - 13.0 | 16:BIOTECH DENTAL - KONTACT , Diamètre - �3.28 & Longueur - 10.1 | 21:BIOTECH DENTAL - KONTACT , Diamètre - Ø3.25 & Longueur - 10.6 i got this result
And below my trigger
any idea ?
Hey @FahdERM -
One small change to fix this. What was happening was 3.26/3.25/3.28 was getting split into 3.2 and 5 by the regex.
I changed the regex from:
The “?” and the end of the original regex is looking to match 0 or 1 of the thing before (which is a digit), this meant if there were multiple digits after the decimal, they wouldn’t get matched. Swapping this to a “+” will match 1 or more which will mean the whole number after the decimal is grabbed.
Hope this helps,
Done and it works perfectly.
Thank you for unblocking me.