How can I faster update the view in the dashboard view?

I made a dashboard view with the 3 views (entrySearchDetail, queryTransactionDataList, querySumList).

tablesliceviewdescription
searchentrySearchDetailentrySearchDetailsearch table has only one row.
transactionDataqueryTransactionDataListqueryTransactionDataListqueryTransactionDataList slice is  a filtered transactionData by the entrySearchDetail.
sumquerySumListquerySumListsum table sums queryTransactionDataList slice.

leinharte_0-1659408456199.png

The change of the criteria at entrySearchDetail view produces the real time change of queryTransactionDataList view.

By the way, it takes about 20 seconds changing the querySumList view.
Is it possible to be updated faster?

Thank you in advance.

Solved Solved
0 18 509
  • UX
1 ACCEPTED SOLUTION

Here is my test.

Details is a detail view of table Filter. [val] is an ENUMLIST. There is only one row.

FILTER Detail 2 is another view of table Filter showing [SUM Value] with expressions (Case 1 & 2) shown below.

SLICE Parents is filtered on[f1] based on [val]. 

SLICE changes instantly both in Cases 1 and 2.

For [SUM Value], Case 1 takes 10 (or more) seconds to change whereas Case 2 is updated instantly. The only difference is the format used in the SELECT statement's filtering expression.

Case 1. Using table[col]

Animation1.gif

SUM(
SELECT(
parents[f3],
IN([f2], INDEX(FILTER[val],1))
)
)

Case 2. Using [_THISROW].[col]

Animation2.gif

SUM(
SELECT(
parents[f3],
IN([f2], [_THISROW].[val])
)
)

View solution in original post

18 REPLIES 18

Steve
Platinum 4
Platinum 4

Move the sum column to the search table so that it shares the same row as the active search. Reconfigure the querySumList slice so it uses that same search table row.

Thanks @Steve . I have tried your suggestion like this.

I moved the sum column(VC) from the sum table to the search table.
As a result, the dashboard view has two views (entrySearchDetail, queryTransactionDataList) and the entrySearchDetail view shows the sum value.

By the way, it still takes same time.
Since there are several sum values also, it isn't handy to move the columns to the search table. I mean that I need another view than the detail view(entrySearchDetail) of the search table for showing the sum values.

Btw, you can have multiple detail views and/or separate the columns you need using slices with their own detail view to keep them better organized on the editor and prevent default-system-assignments

Difficult, as you're fighting the system put in place to increase efficiency and reduce load on the device.

Generally the solution is to move your SUM() elements into the table where you've got your controls.  

One of my patrons asked a similar question, which I answered in a recent live streamhttps://www.youtube.com/watch?v=UAPTyxDnD3E&t=2465s

The problem, which is exactly what you're running into, is sometimes the updates lag behind.

  • The only way to make them not be so slow, is to remove the derivative data elements you've included (anything that's not a direct value somewhere in the system  (no computed values)) and basically brute force everything.
  • But this adds in a level of inefficiency, that depending on the complexity and size of your system could really have an impact.

---------------------------------------------------------------------------------------------------------------

There's a lot involved with problems like this, with no one-size-fits-all answer.

Thanks @MultiTech .

I'll wait until a server completes the calculation.

Recently I had to change a lot of things on a Dashboard I made.
Just FYI, a VC (not real one with AppFormula even) on the same row as my filters solved it.

It seems that slices react a little bit later to the filters so my AppFormula on real column was making the calcs as soon as I edited my filter row but the slice was not updated fast enough so my AppFormula took the previous "instance" of the slice

Thanks @SkrOYC .

If there is a "SELECT" function, I think it takes some time not real time.

There is a difference between mobile view and Open in tab view. In case JUST SUMMING without SELECT function, at mobile view the updating value is real time but at Open in tab view the updating value take some time, at the entrySearchDetail view. ???


It's very complicated to me to deal with the dashboard view. So I'll give up THE REAL TIME UPDATE with SELECT function.😂

This is a little confusing to me, can you elaborate?
As I said I made some changes recently similar to your case.
I used around 18 columns with SELECT() and one last column with some HTML code to show all of them on a ui friendly manner.
It works like charm.

In my case the 18 are real columns and the last one of type LongText + HTML is a VC

SkrOYC_0-1659539702708.png

"Filtros" and "Saldos" are the same row, same slice, just different detail views

@SkrOYC .Thank you for your kind explanation.

To make things clear.
My question is "Is it possible to update the amount immediately?".
( On your example, the amount of Saldos view. )

This is my dashboard like your sample"filterDetail" and "filterAmount" are the same row.

leinharte_0-1659584765576.png

 

When I add "2023" to EnumList on filterDetail view, then contractFiltered view changes immediately, BTW amount changes 20 seconds later NOT immediately (60215010 → 90322515).

Is it normal to take some seconds for changing value that has a "SELELCT" expression?

leinharte_1-1659584880830.png

 

※ Your idea, using LongText + HTML for the Saldos view, is fascinating. 😍

This may not work in your case but...

Add a VC in the filter table with the following expression to calculate the sum based on the filter.

SUM(
 SELECT(
  contact[presentValue],
  AND(
   IN([startYear], [_THISROW].[startYear]),
   [active?] = [_THISROW].[active?]
  )
 )
)

Hide it from filterDetail view.

Create another view with just this VC and show it in your dashboard.

This changes the SUM value instantly.

A select criteria based on values from another table seems to slow things down.  Using tablename[col], Instead of [_THISROW].[col], even slows things down also. My guess is that AppSheet goes to the backend engine to retrieve values if you use table[col] format (just a guess).



Add a VC in the filter table with the following expression to calculate the sum based on the filter.

 

 

 

SUM(
 SELECT(
  contact[presentValue],
  AND(
   IN([startYear], [_THISROW].[startYear]),
   [active?] = [_THISROW].[active?]
  )
 )
)

 

 


 "filterDetail" view and "filterAmount"  view are from the filter table, and "amount" column is VC at the filter table already.

I think that a calculating at the same table with the filtering criteria could be a little faster than a calculating at another table, but still it takes some time.

For a small number of records, it made a world of difference when I tested it (instantly vs 10 sec).

You seem to have many records and that is probably why.

I guess I cannot help you there...

There are two tables, filter and contract.
The filter table has one row and the contract table has only 3 rows.

And the filter table has four columns, ID, startYear, active, and amount.
The amount column is a virtual column that has sum and select functions.

For a small number of records, it made a world of difference when I tested it (instantly vs 10 sec).


I'm not sure "instantly vs 10 sec".
Could you explain the difference of each status, please?

 

 

Here is my test.

Details is a detail view of table Filter. [val] is an ENUMLIST. There is only one row.

FILTER Detail 2 is another view of table Filter showing [SUM Value] with expressions (Case 1 & 2) shown below.

SLICE Parents is filtered on[f1] based on [val]. 

SLICE changes instantly both in Cases 1 and 2.

For [SUM Value], Case 1 takes 10 (or more) seconds to change whereas Case 2 is updated instantly. The only difference is the format used in the SELECT statement's filtering expression.

Case 1. Using table[col]

Animation1.gif

SUM(
SELECT(
parents[f3],
IN([f2], INDEX(FILTER[val],1))
)
)

Case 2. Using [_THISROW].[col]

Animation2.gif

SUM(
SELECT(
parents[f3],
IN([f2], [_THISROW].[val])
)
)

@TeeSee1  😍

I got it. Thank you so much for your video and description. I should've got it.
It works nicely.

Came late to the party but I'm glad it's solved.

In my case I'm also using values from the current row for my html table so I guess there was your problem. Sometimes it's obvious, sometimes it's not.

I have my Select() as real columns quering another table (the slices) so it works fine, but it doesn't make sense to query a whole table and then just take one value if you are doing it from the same row 😁

@SkrOYC . I'm going to make the dashboard view that shows the amount of change and the list of CONTRACT.
It would be like this example view.

leinharte_0-1659710775936.png

I'll also make the spreadsheet file and the pdf file for them(the amount of change and the list of CONTRACT).

Anyway, I think that the dashboard view helps users to get the information of contracts easily.

Is that not a good plan?

 


@leinharte wrote:

Is that not a good plan?

 


No, it's the same thing I'm doing right now with my newest module/app for our company's erp 😂

I'm on the process of creating an automation that sends a file with the filtered information.
It's easy because we already have slices for our Start: expressions

Top Labels in this Space