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.

Access to Records containing a certain character

Featured Replies

Hello, I'm a newbie, be gentle. smile.gif

I'll admit, I have a pretty messy FMPro 6 file, since the client's needs change every week, and I've unfortunately made a lot of "band-aid" fixes instead of making a nice, neat database.

Anyways...

I am trying to accomplish a seemingly simple task: to restrict access to particular records, according to the information in a particular field. More specifically, this client uses manually-entered job numbers that end with one alpha character to indicate salesperson (not the most efficient way to work, but they've been doing this for years and don't really want to change it). They are hiring an assistant for one salesperson that they only want this person to see jobs by this salesperson only.

For example: Job numbers 3000C, 2000C and 2500C belong to this salesperson. Numbers 1000J and 1500V do not. We want the assistant to only access records with job numbers ending in "C".

I was trying passwords privileges, but couldn't figure out what kind of calculation to use under "Browse Records:" (if this is the right place to do it).

Is this even possible, the way we have it set up? Help!

Create an access group for each salesperson naming the group the same as the salesperson's letter code. Then assign the groups to the appropriate passwords. The calculation can then be something like:

PatternCount(Status(CurrentGroups)&"

cpatubo said:

not the most efficient way to work, but they've been doing this for years and don't really want to change it

You just have to hope that in the next following years, they won't hire that much salesmen.

Or already set it to find the last 2 Text characters, starting from "-A" and ending "ZZ"

PatternCount(Status(CurrentGroups),Right(

Substitute(Substitute(Substitute(Substitute(Substitute(

Substitute(Substitute(Substitute(Substitute(Substitute(

SaleNumber,"0",""),"1",""),"2",""),"3",""),"4",""),"5",""),"6","")

,"7",""),"8",""),"9",""),2))

Is there a more elegant way ?

mad.gif

  • Author

This worked beautifully and without a hitch. THANK YOU, Bob! cool.gif

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.