Export CSV blank with data slices even though view is correct: a solution

I had a problem that I didn't get answer to, not from this Forum or from appsheet support. 

Exporting this view to CSV only printed headers if more than one parameter is set. If only one or all is chosen, print is OK. In view, everything looks and acts correctly. I thought it might be a bug but changing expression produced results.

Short explanation:

I have an dashboard view where there is a card view for quick edit boxes and dynamic view, related to what is chosen in quickedit boxes. Dynamic view use slice of an table to filter the data shown. This method is commonly used and can be found several youtube tutorials.

Below is a screenshot what the view looks like. You can have very complex scheme.

Untitled.jpg

Left view is slice from usertable with search parameters, in my case project refs to third table and one or more can be chosen from EumList. Other three boxes not yet operatioinal as I started this over troubleshooting the error. Right view is the slice from another table. This same right side view can be achieved with two different expressions, but only one exports CSV correctly.

In the slice of tasks, this is the expression that's giving errors when exporting the view as CSV and this is the exact one that is shown on appsheettraining and a quite few other YT videos, also mentioned on this site for this kind of filtered dashboard view:

IN([relatedProject], SELECT(user[filtProject],[email]=USEREMAIL()))

and if you'd like to build an expression where it shows every row if no project is chosen then: 

IF(ISNOTBLANK(select(user[filtProject], USEREMAIL()=[email])),
IN([relatedProject], SELECT(user[filtProject],[email]=USEREMAIL())), true)
 
But like said this gave an error on CSV export. If no project is chosen, everything is shown and export prints everything. If only one project is chosen, print is correct but if more than one is chosen, or I use Select All, only headers are exported even though the view on dashboard is correctly shown.
 
So I changed expression to this:
IN([relatedProject], LOOKUP(USEREMAIL(), "user", "email", "filtProject") and to show everything if nothing is chosen:
IF(ISNOTBLANK(LOOKUP(USEREMAIL(), "user", "email", "filtProject")),
IN([relatedProject], LOOKUP(USEREMAIL(), "user", "email", "filtProject")), TRUE)

Now exporting the view acts correctly. Same with dates and every other filter boxes, have to use LOOKUP to get the correct row from user table, rather than SELECT. For some reason with select, if there are multiple parameters (like my exmaple two different projects chosen from enumlist), exporting starts to act up. With dates (or single value parameters like billed/not billed) it didin't matter as you have one parameter on both, start and/or end or none. If someone can figure out why, do tell me...

1 4 345
4 REPLIES 4

As I understand it, you have a dashboard view where the left panel is used to filter rows into the right panel.  You then have an action button to export the displayed rows into a CSV file.  However, if you have filtered the view to include rows for more than a single project, errors occur.

Do I have that right?

What are the errors you are getting?

Also, when the CSV works on filtering by a single Project, is there only a single row in the right panel view at that time?  I.e.  could this be a single row versus multiple rows issue?


Basically yes. No matter which one of the expressions is used, view always shows everything correctly, wether it's rows for one project or several, and yes there can be several rows, ie tasks (dates) for every project. 

But with SELECT as mentioned at start, if project filter is empty, according to IF statement it shows everything and print is correct. Choosing one project from list export works correctly, no matter how many rows. Choosing multiple and the view is correct and shows rows accordingly but exporting csv fails with only headers exported.

No errors occurs other that empty export. Everything works correctly now with LOOKUP, but would like to know why SELECT gives error when selecting multiple.

On dates no matter if I use SELECT or LOOKUP to get the value for the date selection as it's a single value. 

Noticed that same happens if I make action LINKTOFILTEREDVIEW without use of slices and dashboard, and then export this view. If I use SELECT as mentioned, view that opens is correct but export acts as mentioned. With LOOKUP everything works.

Thanks! Using LOOKUP worked for me.

Top Labels in this Space