Formula Consecutivos

Saludos

Tengo la siguiente fórmula:

Concatenar(Año(Hoy()),"-",COUNT(SELECT(Encabezado[Orden de Servicio],[Id Operativo]=[_THISROW].[Id Operativo],TRUE))+1)

Esta fórmula me genera un consecutivo según el operativo seleccionado, es decir que si encuentra 5 registros del operativo seleccionado entonces esta fórmula me muestra 2022-6

hasta acá todo muy bien y funcionando al momento de agregar, pero si edito me genera de nuevo el consecutivo y la idea es que cuando edite me cargue el que ya esta guardado.

Solved Solved
0 4 839
1 ACCEPTED SOLUTION

Please try the formula in the initial value of the column.

Define App formulas and Initial values - AppSheet Help

You may also have another issue with your formula. If an existing record in between is deleted, the newly added row may create a duplicate consecutive number because the formula is based on COUNT() function.

View solution in original post

4 REPLIES 4

Please try the formula in the initial value of the column.

Define App formulas and Initial values - AppSheet Help

You may also have another issue with your formula. If an existing record in between is deleted, the newly added row may create a duplicate consecutive number because the formula is based on COUNT() function.

Hola Suvrutt_Gurjar

Tienes toda la razón sobre el count() como harías cuando se trata de generar un numero de documento como factura o remisión, cual seria la mejor opción

Voy a probarlo en el valor inicial de la columna

Gracias

 

Hola  Suvrutt_Gurjar

Me funciono perfectamente aplicando la formula en valor inicial

Muchas Gracias

tendras otro problema, y es que si dejas la formula alli, cuando varios usuarios hagan al mismo tiempo la funcion, prueba y veras

Top Labels in this Space