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.

cash out

Featured Replies

Hi there,

I do my cashouts from 4pm to 4pm opposed to daily. I developed a script that searches in part the sales.

Fields:

Date (Date): Creation Date

Time (Time): Creation Time

Yesterday Today(Calculation - text): DateToText(Today- 1) & "..." & DateToText(Today)

Four Oclock (Time - Auto Enter data): 16:00:00

Four Oclock Minus one Second (Time - Auto Enter Data): 15:59:59

Four Oclock String (Calculation - text): TimeToText(Four OClock) & "..." & TimeToText(Four OClock Minus One Second)

The Script:

Copy (Select "Yesterday Today")

Enter Find Mode()

Paste (Select "Date")

Go To Field (Time)

Pause/Resume Script()

Insert Text (Select "Time")

Perform Find (Replace Found Set)

---

I know there is something wrong but I can't pin point the problem. I want to use the Four Oclock String field but I don't how to make it work with the search script!

Any help is welcome,

bk17

Hi bk17,

I would recommend a couple of changes in your calculations and script:

It is better to use the function Status(CurrenDate) instead of Today.

You will find that you'll have better control over results by using Insert Calculated results instead of paste.

Date and Times can be tricky, so if the changes don't do it, be sure and check that the calculations are Date and Time (fields or Results are in Date and Time), or you may need to convert them by using Text to Date and Text to Time in your calculations.

HTH

Lee

cool.gif

  • Author

I modified Today to Status(CurrentDate) and replace Paste by Insert Text but no result.

I modified the script. It looks like this now:

Copy (Select "Yesterday Today")

Enter Find Mode()

Insert Text (Select "Date")

Copy (Select "Four Oclock String"

Insert Text (Select "Time")

Perform Find (Replace Found Set)

---

Any help-

bk17

I would split this into two requests, one for yesterday after 3:59, and one for today before 4 PM.

Enter Find Mode [ ]

Set Field [Date, Status(CurrentDate) - 1]

Insert Text [select, Time, ">=16:00:00"]

New Record/Request

Set Field [Date, Status(CurrentDate)]

Insert Text [select, Time, "<16:00:00"]

Perform Find[ ]

I haven't tested this too much. So let me know how it works out.

  • Author

It didn't work. I guess a few test is required from you.

thanks,

bk17

Try Insert Calculated Result instead of Insert Text, and be more specific about how it didn't work. What were the results?

It doesn't work because Four Oclock string does not exist in Find Mode, so you can't copy it. You're only finding records from yesterday and today.

I don't think it will work that way anyway, because 16:00:00...15:59:59 is like saying Status(CurrentDate) & "..." & Status(CurrentDate) - 1. The starting value is greater than the ending one, which is why I split it into two days.

You are right of course. Duh. I didn't get an error beep, so it appeared to work.

Lee

  • Author

Hi Queue

I am a bit puzzle with your comment: Try Insert Calculated Result instead of Insert Text.

Do I use that with the four oclock string?

Do I enter any information in Specify?

In any case, can you build me a script that would work?

looking for your reply

bk17

Use the same steps I provided earlier, just substitute Insert Calculated Result for Insert Text.

Insert Text worked fine for me, but I haven't done much work with time fields. They seem much more persnickity than date fields.

Add Pause/Resume steps after setting the time field to see what data is being entered.

  • Author

Queue,

The Insert Calculated Result doesn't let me enter '>=16:00:00' in Specify. There is a syntax error.

bk17

Are you using single or double ticks around the text?

Can you attach the file?

  • Author

Queue,

OKay, I added the quote. I performed the script but it didn't work. I decided to build you a little file. I created 5 records. The script should find 2 out 5. I imported the script and it worked with the little file. I almost step out of my chair. What's wrong with my genuine file?

Some clues...

Date and Time fields are creation fields.

When I perform the script, the view is a form.

All fields can be seen on screen.

Gosh, any idea!!

bk17

Firstly, the Insert Calculated Result script step requires that the referenced field is on the current layout. If it isn't the insert won't happen. It's caught me before.

Secondly, are the date and time fields *really* date and time fields? (Not data type text.)

  • Author

Hey Vaughan,

Thanks for your comments. They sparked a solution. I realized that my Date and Time fields were located in the header. I moved them and it worked perfectly. I use a view form to do my cash out. All fields are displayed to do a nice print out.

bk17

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.