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

Featured Replies

I have a transportations system that is broken in two parts.

One picks up every Mon, Wed, and Fri, and the Other picks up every Tues, Thur, Sun

Using today's date how can I define a field to tell me what day something will be picked up?

I don't think you have given us enough information.

  • Author

OK Here is what I've come up with so far:

If ((even odd = 2) and DayOfWeek ( If(DayOfWeek(test date 7 +( If ((If (Mod(DayOfWeek (test date 7 );2)=0 and Mod(even odd;2) = 0;1 ;If (Mod(DayOfWeek (test date 7 );2) ≠ 0 and Mod(even odd;2) ≠ 0;1 ;0 )))=1;0;1)))=7;(test date 7 +( If ((If (Mod(DayOfWeek (test date 7 );2)=0 and Mod(even odd;2) = 0;1 ;If (Mod(DayOfWeek (test date 7 );2) ≠ 0 and Mod(even odd;2) ≠ 0;1 ;0 )))=1;0;1)))+1;test date 7 +( If ((If (Mod(DayOfWeek (test date 7 );2)=0 and Mod(even odd;2) = 0;1 ;If (Mod(DayOfWeek (test date 7 );2) ≠ 0 and Mod(even odd;2) ≠ 0;1 ;0 )))=1;0;1))) =1);

If(DayOfWeek(test date 7 +( If ((If (Mod(DayOfWeek (test date 7 );2)=0 and Mod(even odd;2) = 0;1 ;If (Mod(DayOfWeek (test date 7 );2) ≠ 0 and Mod(even odd;2) ≠ 0;1 ;0 )))=1;0;1)))=7;(test date 7 +( If ((If (Mod(DayOfWeek (test date 7 );2)=0 and Mod(even odd;2) = 0;1 ;If (Mod(DayOfWeek (test date 7 );2) ≠ 0 and Mod(even odd;2) ≠ 0;1 ;0 )))=1;0;1)))+1;test date 7 +( If ((If (Mod(DayOfWeek (test date 7 );2)=0 and Mod(even odd;2) = 0;1 ;If (Mod(DayOfWeek (test date 7 );2) ≠ 0 and Mod(even odd;2) ≠ 0;1 ;0 )))=1;0;1)))+3;

If(DayOfWeek(test date 7 +( If ((If (Mod(DayOfWeek (test date 7 );2)=0 and Mod(even odd;2) = 0;1 ;If (Mod(DayOfWeek (test date 7 );2) ≠ 0 and Mod(even odd;2) ≠ 0;1 ;0 )))=1;0;1)))=7;(test date 7 +( If ((If (Mod(DayOfWeek (test date 7 );2)=0 and Mod(even odd;2) = 0;1 ;If (Mod(DayOfWeek (test date 7 );2) ≠ 0 and Mod(even odd;2) ≠ 0;1 ;0 )))=1;0;1)))+1;test date 7 +( If ((If (Mod(DayOfWeek (test date 7 );2)=0 and Mod(even odd;2) = 0;1 ;If (Mod(DayOfWeek (test date 7 );2) ≠ 0 and Mod(even odd;2) ≠ 0;1 ;0 )))=1;0;1))))

"test date 7" = is a testing field.

In the file I have currently there are 7 "test Field" and test day 1 is equal to 12/3/2006, and test day 2 equal to 12/4/2006, etc.

I have found that this calc works, but not consistently.

I will try and attach the file.

  • Author

Also "Even Odd" is either a 1 or a 2.

1 if the run is on Sunday, Tuesday, Thurs.

2 if the run is Mon., Wed., Fri.

comment, as far as more information....

lets simplify this.

There are two trucks.

Truck 1 picks up on Mon, Wed, Fri

Truck 2 picks up on Sun, Tues, Thur.

Notice no Sat..

If I put something out for a truck1 today(Tues) when it it get picked up, not until Wednesday, but if it was going to go on truck 2 it would get picked up today.

So with a combination of today's date and what truck it is on, I should be able to tell when the truck will pick it up.

Sorry if I made it more confusing, I've been starring at the define calc field box for far too long......

If I understand this correctly, the day of week can be either odd or even, and so can the truck number. If the two parities are the same, there's no delay. If they are not the same, there's a delay of one day (or the other way around, if you've numbered the trucks differently).

If so, you should be able to get the pick up date by something like:

Let ( [

dayParity = Mod ( DayOfWeek ( Date ) ; 2 ) ;

truckParity = Mod ( TruckNumber ; 2 )

] ;

Date + ( dayParity xor truckParity )

)

  • Author

Thanks that did it.

I added a Case statement to take care of the Sat. and Sun. thing.

Again thanks....

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.