Skip 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.

Omitting Records

Featured Replies

I am trying to omit some records that are classed as stolen or BER (Beyond Economical Repair) before I do a stocktake for my school.

Can anyone help me with this code as it is driving me crazy

Go To Layout ["Notes"]

Go To Field ["Status"]

If ["Status = "BER" or "Stolen"]

Omit Record

Go to Record/Request/Page[Exit after last, Next]

Loop

End Loop

End If

Many Thanx

Poida confused.gif

Hi Poida,

CloseTry this one.

Show All Records

Go to Layout [ Notes ]

Enter Find Mode

Set Field [ Status , "BER" ]

Omit Record

New Record/Request

Set Field [ Status , "Stolen" ]

Omit Record

Perform Find

HTH

Lee

smile.gif

Poida:

The problem with your script is that when you use an "and" or an "or", you need to restate everything, so it should read:

If(Status="BER" or Status="Stolen", etc.

  • Author

Thanx all for your help

Im still not having much luck though

Ive posted the script Im using as a jpeg

The script will only omit 13 records with the value of BER or stolen

there are another 10 or 12 records which are BER or stolen which are not omitted for some reason

Its driving me crazy

Any help would be really appreciated

  • Author

Sorry though I could post an image of the script for people to see

Here it is

Go To Layout [Notes]

If [status = "Stolen" or Status = "BER"

Omit Record

End If

Go To Record/Request/Page[Exit after last, Next]

Perform Script[subscripts, "Omit BER or Stolen"

Snap3.jpg

Do some records have both BER and Stolen in the same field? If so you might want to use the PatternCount function.

I think Lee's suggestion using Finds would do the job, but if you want to loop through them all...




Show All Records



Go to Record/Request [first]



Loop



 If [PatternCount(Status, "BER") > 0 or



     PatternCount(Status, "Stolen") > 0]



  Omit Record



 Else



  Go to Record/Request [Next]



 End If



 Exit Loop If [status(CurrentRecordNumber) = Status(CurrentFoundCount) or



               Status(CurrentFoundCount) = 0]



End Loop



If [status(CurrentFoundCount) > 0



 Perform Script[subscripts, "Omit BER or Stolen"]



Else



 Beep



 Show Message ["Everything was BER or Stolen.", OK]



End If



Watch the logic here: if a record is omitted there is no need to do a "go to the next record" because we're already on the next record. We need to exit the loop if we're on the last record or there are no records left in the found set. Also, the script at the end should only be run if some records weren't omitted.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.