stan111 0 Posted July 6, 2020 Share Posted July 6, 2020 Gents, is it possible to ask Filemaker to extract volume and weight data from the Naming field and put it into corresponding fields? price.fmp12 Link to post Share on other sites
comment 1,775 Posted July 6, 2020 Share Posted July 6, 2020 It is possible only if there are some rules that one could use for such extraction. Looking at the examples given in your file, I am not able to formulate any rule that would fit all of them, except perhaps one: it seems that the first group of consecutive digits is the numerical value of the volume or the weight. But then it gets complicated, because sometimes there is a space between the digits and the unit and sometimes there isn't. And no computer is smart enough to recognize that ml is a unit of volume while gr is a unit of weight without having a lookup table of all possible units to consult. Anyway, I would start by looking at the position of the first digit in the given text and make a split there. Then see what you can do with the extracted tails: 330 ml 330ml 400 gr 210 g (20 pcs) 220gr 30ml 8 pcs BTW, this seems like one of the relatively rare cases where using regex (with the help of a plugin) might be a good idea. Link to post Share on other sites
stan111 0 Posted July 6, 2020 Author Share Posted July 6, 2020 ok, what if we simplify the task. I've attached a new file. Thanks price.fmp12 Link to post Share on other sites
comment 1,775 Posted July 6, 2020 Share Posted July 6, 2020 You keep giving me examples, when I ask for rules. I can make up rules that will fit your two examples, but they may not fit the next one. Link to post Share on other sites
stan111 0 Posted July 6, 2020 Author Share Posted July 6, 2020 Unfortunately, I don’t have such a plugin to solve my issue, that’s why I simplified the task in order to get a simple solution. Link to post Share on other sites
comment 1,775 Posted July 6, 2020 Share Posted July 6, 2020 I am afraid you keep confusing between what and how. First, we need to figure out what we want to do. Then, and only then, comes the question of how to do it. So far, I am not sure what exactly you want to do here. The plugin is in the "how" category. And if you want to use regex, you can use the free BaseElements plugin. Link to post Share on other sites
stan111 0 Posted July 7, 2020 Author Share Posted July 7, 2020 since regex is free, I suggest we continue with the first example. So, how regex can help here? Link to post Share on other sites
Steve Martino 44 Posted July 7, 2020 Share Posted July 7, 2020 How is the data initially inputted, import? Seems like forcing the user to put the type of measurement in when entering thru a dropdown (if possible) is the easier way to go. Link to post Share on other sites
stan111 0 Posted July 7, 2020 Author Share Posted July 7, 2020 impo 38 minutes ago, Steve Martino said: How is the data initially inputted, import? import from Excel spreasheet 39 minutes ago, Steve Martino said: Seems like forcing the user to put the type of measurement in when entering thru a dropdown (if possible) is the easier way to go. Yeah, maybe Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now