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.

Find unique # in a field containg a list of #'s

Featured Replies

  • Newbies

I have a numeric field (theDay) that is displayed as Check Boxes with a Value List containing the numbers 1 to 31 that represents the days of a month. I would like to find out if the day from a date field (theDate) has been checked in theDay field. I cannot use PatternCount(theDay,day(theDate)) because if the day is 1 then a match will be made on any day with a 1 in it such as 1, 10...19, 21, 31.

e.g.

[ ] 1 [x] 2 [ ] 3 ...... would match with 2/3/2004

[ ] 11 .....

[x] 21 ..... would not match with 2/3/2004

This will tell you what the day# of the date is:

MiddleWords( DateToText(Date_), 2, 1)

Appears to work no matter how the date is "formatted" to look on the layout.

  • Author
  • Newbies

Fenton, Thanks for the reply.

I can get the Day# by using the day() function as shown above in my first post. My problem is related to how data is stored in a field that is filled using the checkbox/valuelist method.

The following examples show what I mean:

"SatMonTue"

This string was imported from a checkbox/valuelist field that has days of week.

"102322"

This string is the one I am interested. It comes from another checkbox/valuelist field with the values 10,23,22 selected.

Using the day() function I can extract the day from the date. So for 2/3/2004 I get the value 2 for the day.

I now want to see if 2 (which is the day from the above date) appears in the string "102322" without detecting the 2 in 23 and 22.

So in this example there should be no match.

Hope this explains my problem a little better.

premier

You may format it as text rather than num.

Then the values would be separated by a Carriage Return, and it should be easy then to compare the value of gMatch (a global) with your DaysNumber field.

Patterncount("

  • Author
  • Newbies

Thanks Ugo

Yes, that did the trick.

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.