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.

time trigger Script

Featured Replies

I've made a script to export a file every 30th seconds of the minute base upon Status field. If there's a new record added, the status will mark as "NO". If the new record/records are exported, it the status will mark as "YES". There's a trick to this inorder the script to work is that I must have a dummy record that always says "NO" because

if the script found nothing it will pause and say no record found.

Here is how the script goes,

Loop

Show All Records

If[seconds(Get(CurrenTime)))=30]

Perform Script ["Enter Find Mode"] {which looks for records with the "NO" status }

If[Get(FoundCount) > 1]

Perform Script["Export Download"] {which export the new records to a text file for other apps to use }

End If

Perform Script["Replace Found"] {replace the records status "NO" to "YES" }

Perform Script["Dummy Record"] {set the dummy record from "Yes" status to "No" status }

End If

Allow User Abort[On]

End Loop

My question is how can i get it to check every 30 seconds instead of the seconds reaches 30 to execute the script.

Edited by Guest

"There's a trick to this inorder the script to work is that I must have a dummy record that always says "NO" because

if the script found nothing it will pause and say no record found."

Look up the Set Error Capture script step to stop an error message from being triggered.

"My question is how can i get it to check every 30 seconds instead of the seconds reaches 30 to execute the script"

I would create two new global fields: g_CheckTime1 and g_CheckTime2 set these when the script is started (Before you start looping!):B

g_CheckTime2 = Seconds(Get(CurrenTime)))

g_Checktime1 = If(g_CheckTime2 < 31; g_CheckTime2 + 30; (g_CheckTime2 + 30)- 60)

then in replace of If[seconds(Get(CurrenTime)))=30] you have:

If[seconds(Get(CurrenTime)))= g_CheckTime1 or Seconds(Get(CurrenTime)))= g_CheckTime2]

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.