Formula para limitar horario en la edicion y eliminacion de registros

Hola!

Me gustaria limitar el horario que puedan agregar, editar o eliminar registros los diferentes usuarios que trabajan con la aplicacion.
La idea es que solo puedan ADD, EDIT y DELETE en el horario de 8 hs a 20h de lunes a viernes.

Gracias!

Solved Solved
0 12 424
1 ACCEPTED SOLUTION

Ve a la tabla -> "Are updates allowed?" -> Activa el expression assistant y agrega esto:SkrOYC_0-1669044958323.png

 

IF(
  AND(
    WORKDAY(TODAY(), 5)=TODAY()+7,
    TIMENOW()>"08:00:00",
    TIMENOW()<"20:00:00"
  ),
  "ALL_CHANGES",
  "READ_ONLY"
)

 

 

View solution in original post

12 REPLIES 12

Hello, you can do it working with  weekday() on table settings

Hola @diogolupcosta 

Nose como formularlo ya que es de lunes a viernes y con un horario especifico

Any help?

Column(s) option that you want to restrict - update behavior - editable if.

Then, put the following expression:

 

AND(
  WEEKDAY(TODAY()) > 1,
  WEEKDAY(TODAY()) < 7,
  TIME(NOW() >= "08:00:00"),
  TIME(NOW() <= "18:00:00")
)

 

thanks @diogolupcosta 

But I want to restrict actions (Delete, edit, add) not columns

The same expression I wrote but put it on behavior of the actions

@diogolupcosta 

Error formula

Condition AND((WEEKDAY(TODAY()) > 1), (WEEKDAY(TODAY()) < 7), TIME((NOW() >= "12/30/1899 8:00:00 AM")), TIME((NOW() <= "12/30/1899 6:00:00 PM"))) has an invalid structure: subexpressions must be Yes/No conditions

Captura de pantalla 2022-11-21 a la(s) 12.30.59.png

AND(
  WEEKDAY(TODAY()) > 1,
  WEEKDAY(TODAY()) < 7,
  TIME(NOW() >= "08:00:00"),
  TIME(NOW() <= "18:00:00")
) = true

@marinocity ,

Before looking into feasibility, would you please clarify if you want

1. To restrict the users' data entry time ( meaning usage of app )  between 8 a.m. and 8 p.m. Monday through Friday. Meaning they cannot use the app beyond these hours.

OR

2. To restrict the users' data entry values  in some date time columns between 8 a.m. and 8 p.m. Monday through Friday. Meaning they cannot enter values beyond outside these limits.

3. What type ( date, datetime, time)  of columns you have where you wish these restrictions, in case you are looking for option 2 above.

thanks @Suvrutt_Gurjar 

Option 1.
Only they can use app (edite, delete, add) - Monday to friday - 8hs - 20hs.
But They can see app , 24hs every day

Ve a la tabla -> "Are updates allowed?" -> Activa el expression assistant y agrega esto:SkrOYC_0-1669044958323.png

 

IF(
  AND(
    WORKDAY(TODAY(), 5)=TODAY()+7,
    TIMENOW()>"08:00:00",
    TIMENOW()<"20:00:00"
  ),
  "ALL_CHANGES",
  "READ_ONLY"
)

 

 

Works perfect!

thanks @SkrOYC 

Top Labels in this Space