I would like to "grab" numbers from a text field and then use the numbers in a calculation.
[Example text A] = "1 Pair per Bag, 12 Bags per Inner Bag, 12 Inner Bags per Case"
[Example text B] = "10 Eaches Box, 100 Boxes per Case"
I would like to create a formula field that grabs the above numbers in the sequence listed and multiple..
Example A  New formula field [1 * 12 *12] = 144
Example B  New formula field [10 * 100] = 1000
is this possible?
 180 Points
Posted 4 years ago
Ⲇanom the ultimate (Dan Diebolt), Champion
 29,604 Points
On the other hand this can done using script in a reliable way. This code fragment splits the text field on nondigits using a regular expression and then reduces the array by multiplying all nonempty terms together.
var field = "1 Pair per Bag, 12 Bags per Inner Bag, 12 Inner Bags per Case";
var terms = field.split(/\D+/g);
var product = _.reduce(terms, function(memo, item) {
return item.length > 0 ? item * memo : memo;
}, 1);
console.log(product);
logs 144
QuickBasePros_IDS, Champion
 2,888 Points
Ⲇanom the ultimate (Dan Diebolt), Champion
 29,604 Points
Questions, Answers and Points
https://haversineconsulting.quickbase.com/db/bj3fd38iz?a=er&rid=1
Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=404
 5,882 Points
instead of number can we pick usernames/email address from text field through this.
can you help me with your code ?
Thanks,
Gaurav
Ⲇanom the ultimate (Dan Diebolt), Champion
 29,604 Points
 5,882 Points
can you give me code of email pattern ?
Related Categories

Formulas & functions
 2834 Conversations
 66 Followers

Tables & fields
 7102 Conversations
 162 Followers