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.

Excluding blank values

Featured Replies

I have a database with a 1000 records and get the results fine and dandy but would like to exclude the records that have a blank or empty value in a particular field. How do I do that? Or maybe my question is is there a way to check if a value is present?

-db=SchoolsMaster.fp5, -lay=formview, -sortfield=school, -sortorder=accend, -max=all,-findall

I think the -op== command is used but don't understand how to format this.

Thank you

Kent

[ January 17, 2002: Message edited by: Turansky ]

You can use:

[FMP-Record]

[FMP-If: myfield .neq.] Display fields from record [/FMP-If]

[/FMP-Record]

Hope this helps.

Garry

Another option:

Make your original link something like:

-db=SchoolsMaster.fp5&-lay=formview&-sortfield=school&-sortorder=ascend&-max=all&-Op=eq&Fieldname=&-find

  • Author

Garry,

It worked perfect. Thank you

-------------------------------------------

The Bridge,

I tried what you said but that did not work. Let me also point out that I didn't fully explain what I was doing. If I could do it your way it might be less code for me. Which I always like. Thank you

This is what works now for me:

<select name="school" size="10">

[FMP-InlineAction: -db=Schools Master.fp5, -lay=form view, -sortfield=school, -sortorder=accend, -max=all,-findall] [FMP-Record][FMP-If: school .neq.]<OPTION VALUE=[FMP-field: school]>[FMP-field: school][/FMP-If]

[/FMP-Record]

[/FMP-InlineAction]

</select>

[ January 18, 2002: Message edited by: Turansky ]

Whoops... the problem was with me, not you. In my example, I used -Op=eq; it should be -Op=neq.

Here are the values the -Op tag accepts:

eq - equals

cn - contains

bw - begins with

ew - ends with

gt - greater than

gte - greater than or equal to

lt - less than

lte - less than or equal to

neq - not equal to

I notice you have -SortOrder=accend. This should be -SortOrder=ascend. Also, I'd recommend designing your databases with underscores in the names of fields and layouts instead of spaces.

Having said all that, your best bet may be to go with Garry's solution, since it actually works for you. smile.gif" border="0

  • Author

Hello The Bridge,

I gave that a try but still no success - it's still spitting out blank fields before it gets to the actual fields that have data. Any other solutions?

[FMP-InlineAction: -db=Schools_Master.fp5, -Op=neq, school=, -lay=form_view, -sortfield=School, -sortorder=ascend, -max=all, -findall]

Thank you

Kent

With the method by The Bridge, try -find not -findall; e.g:

[FMP-InlineAction: -db=Schools_Master.fp5, -Op=neq, school=, -lay=form_view, -sortfield=School, -sortorder=ascend, -max=all, -find]

A few ways to "skin-a-cat". wink.gif" border="0

All the best.

Garry

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.