Upload something from time to time

i have upload menu on my app. if i want to make rule that someone only can upload when the time in upload form is from 07.30 - 16.00, what should i do? thank you

1 13 511
13 REPLIES 13

i forget, it doesnt include weekend. so monday-friday 07.30 - 16.30




i still cant solve it:(

No problem with that. In Java and Ajax, seperately there is no time and no date, there is datetime concept only. 12/30/1899 is called Joda Date to complete a time variable to a datetime format.

@Marc_Dillon had excluded the week-end in the LIST because you have specified it like that in the 2nd post:

Are you meaning you only want them to be able to โ€œSyncโ€ their app during those windows?

Thatโ€™s not possible really, we donโ€™t have control over when the sync button is shown - or when things are allowed.

nope. thats not it. i mean when someone filling the form and click save there are formula that preventing to save because the time when they filling the form is not office hours. how to make it happen? i dont know the formula

You can set a valid_if expression for some required column in the form.

AND( 
  IN( WEEKDAY( TODAY() ) , LIST(2,3,4,5,6) ) , 
  TIMENOW() <= 16:00:00 , 
  TIMENOW() >= 07:30:00 
  )



thank you, but why there is โ€œlistโ€ in your formula? and i input that formula on behavior, add, only if this condition is true, right?

@shiverly
What kinda โ€œmenuโ€ is that? Is it a UX view? If so, what type is it? Can you give a screenshot pls?

that menu is totally fine. i just need a formula on behaviour โ€œaddโ€ , Only if this condition is true (to prevent someone to add on office hours). i have a column that show what time they upload something (initial value now())

im sorry my english is baadd:(

You need to add the expression that @Marc_Dillon had already proposed to the Only if this condition is true propety under the Behaviour tab of system generated Add action.

The given expression checks:

  • if the Weekday for any particular day falls into Mon-Fri excluding weekends via LIST(2,3,4,5,6) where numbers in the LIST expression denotes to the weekday numbers:
    โ€“ MON > 2
    โ€“ TUE > 3
    โ€“ WED > 4
    โ€“ THU > 5
    โ€“ FRI > 6
  • if the Current Time is greater than or equal to 4:00pm
  • if the Current Time is smaller than or equal to 7:30am

and if ALL of the conditions are evaluated to TRUE than the ADD action is enabled, otherwise it will be hidden.

i put that but
this happen

Arithmetic expression โ€˜(TIMENOW() <= โ€œ16:00:00โ€)โ€™ does not have valid input types

but i put " ", so it become like this โ€œ07:30:00โ€, โ€œ16:00:00โ€ and it worked! but there is this statement

โ€ฆ2: (TIMENOW()) is less than or equal to (โ€œ12/30/1899 4:00:00 PMโ€)
โ€ฆ3: (TIMENOW()) is greater than or equal to (โ€œ12/30/1899 7:30:00 AMโ€)

the date is 12/30/1899, is it okay?, i try to add row on 07:35:00 but today is sunday so i cant add any row, and then i change the formula list to list (1,2,3,4,5,6) and it works

Top Labels in this Space