Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

script to extract data from a field and paste it into another field

Featured Replies

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

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.

 

  • Author

ok, what if we simplify the task. I've attached a new file. Thanks

 

price.fmp12

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.

 

  • Author

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. 

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. 

 

  • Author

since regex is free, I suggest we continue with the first example. 

So, how regex can help here?

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.

  • Author

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

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.