velocidad de respuesta lenta usando Usersettings()

Hola a todos!

Quisiera saber si existe una forma de que las columnas virtuales actualicen sus valores mรกs rapido o al instante cuando en su formula existe usersettings()...

en cualquier formula que use la condiciรณn [user]=usersettings("user") para referirme a los registros del usuario. actualiza su valor muy lento (entre 5 y 10 segundos)

esto se presenta en muchos casos pero solo les mostrare รฉste para no abrumarlos.

SUM(SELECT(VENTAS DETALLES[CANTIDAD],AND([CODIGO RM]=[_THISROW].[CODIGO RM],LOOKUP(MAX(SELECT(VENTAS RESUMEN[_RowNumber];[USUARIO]=USERSETTINGS("USUARIO"))),"VENTAS RESUMEN","_RowNumber";"STATUS")=ABIERTA,[ID VENTAS RESUMEN]=LOOKUP(MAX(SELECT(VENTAS RESUMEN[_RowNumber];[USUARIO]=USERSETTINGS("USUARIO"))),"VENTAS RESUMEN","_RowNumber";"ID VENTAS RESUMEN"))))

esta formula lo que hace es sumar las cantidades de un producto si varias condiciones se cumplen

 

agradezco su ayuda!

0 2 78
2 REPLIES 2

In general , your expression appears to be very sync time expensive and against general recommendations in AppSheet.

Having multirow expressions such as SELECT(), LOOKUP() in virtual columns can slow down the sync time. In this particular expression, you have as many as two SELECTS() in the form of LOOKUP() (LOOKUP() is a specific version of SELECT() ) within an outer SELECT() . Then there are one each SELECT() in each of the LOOKUP() expression. So it sounds you have as many as 5 multirow expressions in one expression. Naturally,   your expression will have many many iterations and thereby slowing down the sync time. Each inner LOOKUP() will iterate over the table involved to find a matching value. Thereafter the outer SELECT() iterate over the entire table "SALES DETAILS"

App performance: Core concepts - AppSheet Help

Improve the speed of Sync - AppSheet Help

The following is a very useful post that discusses the factors impacting performance. Please note that Praveen ( @pravse ) in that post thread is the ex CEO of AppSheet before AppSheet became part of Google Workspace. So his suggestions are very important.

Solved: Improving performance by getting rid of unnecessar... - Page 2 - Google Cloud Community

 

See if your formula written in the form below can be optimized.

SUM(
SELECT(
SALES DETAILS[CANTITY],
AND(
[RM CODE]=[_THISROW].[RM CODE],
LOOKUP(
MAX(
SELECT(
SALES SUMMARY[_RowNumber],
[USER]=USERSETTINGS("USER")
)
),
"SALES SUMMARY",
"_RowNumber",
"STATUS"
) = OPEN,
[ID SALES RESUMEN] = LOOKUP(
MAX(
SELECT(
SALES SUMMARY[_RowNumber],
[USER]=USERSETTINGS("USER")
)
),
"SALES SUMMARY",
"_RowNumber",
"ID SALES RESUME"
)
)
)
)

Top Labels in this Space