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.

Field Flagging

Featured Replies

Morning all;

As usual seeking the valuable input from the group. 

I have  a script that is executed by a button that time stamps two fields and one field that sets a values the flag "Yes". 

Field: DateRecordReadyForInvoicing

Field: TimeRecordReadyForInvoicing

Field: FalgRecordReadyForInvoicing, set field to "Yes."

Then I have a button that prints the records with a flag value of "Yes."

My challenge comes in, in clearing the "yes" from the flag field,

I am using the following script but don't seem to be abl to get it to work.

Perform Find "Yes"

Loop 

Exit Loop if flag value is "empty"

Clear "Flag" Field

End loop

It seem to clear the first record but not the found set

 

Any advice is greatly appreciated. 

Thanks

Rudy

To loop among the records of the found set and set a field, do this (after performing a find):

Go to Record [ First ]
Loop
  Set Field [ YourTable::FlagRecordReadyForInvoicing; "" ]
  Go to Record [ Next; Exit after last ]
End Loop
Commit Records

Alternatively you could do (again, after performing a find):

Replace Field Contents [ No dialog; YourTable::FlagRecordReadyForInvoicing; Replace with calculation: "" ]
Commit Records

 

 

Edited by comment

Hi Rudy,

If you must mark records, the less you touch them the better.  Attached is an example which:

1. reduces number of fields
2. cuts down on frequency you touch the data
3. provides timestamp when invoice was printed

Using timestamp when printed has additional benefits of 1) an audit trail when a group of invoices was printed and 2) allows benchmark stats between when Invoice is ready and when finally generated.

I do not know your process. You may wish to print the list of those skipped or loop a second time and print any skipped from the first round.  You may wish to add robust error trapping - I used an empty field as proof the Set Field[] failed instead.  You may wish to create a calculation of the status (instead of using button bar as I did) if an export is required but this is a rough expansion of Comment's response and not a contradiction of it.

Just some things to consider. 🙂

Invoicing.fmp12

Edited by LaRetta

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.