It has been suggested to me (by the performance analyzer) that there could be a potential improvement in sync times, because of Format Rules expressions on a table.
Does anyone have any suggestions how I could improve these expressions?
Security filters are already in place.
Expression 1.
AND(
[AssignedTo]=UserSettings(UserID),
ISNOTBLANK([AssignedDate]),
HOUR(TODAY() - MAX( LIST([LastUpdated], [AssignedDate]) ) ) / 24 >
LOOKUP(โAddress Fieldsโ, โAppSettingsโ, โSettingNameโ, โNumeric_โ)
)
Expression 2.
AND( [AssignedTo] = UserSettings(UserID),
HOUR(TODAY() - MAX(LIST( [LastUpdated], [AssignedDate] )) ) / 24 <=
LOOKUP(โAddress Fieldsโ, โAppSettingsโ, โSettingNameโ, โNumeric_โ)
)
Expression 3.
AND(
OR(ISBLANK([AssignedTo]),
AND(ISNOTBLANK([AssignedTo]), UserSettings(UserID)<>[AssignedTo])),
HOUR(TODAY() - MAX( LIST([LastUpdated], [AssignedDate]) ) ) / 24 >
LOOKUP(โAddress Fieldsโ, โAppSettingsโ, โSettingNameโ, โNumeric_โ)
)
Any tips gratefully accepted
@David_Joyce
Setup a VC in your table with this expression:
AND(
[AssignedTo]=UserSettings(UserID),
HOUR(TODAY() - MAX( LIST([LastUpdated], [AssignedDate]) ) ) / 24 > LOOKUP(โAddress Fieldsโ, โAppSettingsโ, โSettingNameโ, โNumeric_โ)
)
Then you can evalueate:
Expression 1:
AND(
ISNOTBLANK([AssignedDate]),
[VirtualColumnName]=TRUE
)
Expression2:
[VirtualColumnName]=TRUE
Hmm. Ok, thank you very much. That would simplify the expression certainly, but AppSheet tells us that virtual columns also have a performance cost. I will try it and see what effect it has, thanks again
@David_Joyce
Using complex expressions in Format rule conditions are always much more expensive than using them in Virtual columns
Hmm, Thats a nice little nugget of information, which I did not know. My thanks, once again, sir!
Youโre welcome @David_Joyce, my pleasure. Glad to be helped of.
User | Count |
---|---|
61 | |
25 | |
14 | |
11 | |
6 |