Save a logsheet file with multiple rows

Iโ€™m trying to save a file from appsheet that includes multiple rows of a table. The rows are all from that day. How would I accomplish this?

Solved Solved
0 15 872
1 ACCEPTED SOLUTION

Nope. MINROW() produces a row key, not a number, so you cant just add one to it (unless the key is a number).

If your log sheet has a fixed number of rows, and all rows are replaced every day (or however often the log sheet is regenerated), such that you will always know how many rows the spreadsheet will have and what the spreadsheet row numbers will be, you can use the spreadsheet row numbers:

<<LOOKUP(2, "My Table", "_ROWNUMBER", "Data Column")>>
<<LOOKUP(3, "My Table", "_ROWNUMBER", "Data Column")>>
<<LOOKUP(4, "My Table", "_ROWNUMBER", "Data Column")>>
...

where 2, 3, and 4 are the actual spreadsheet row numbers, and _ROWNUMBER is that literal text (_ROWNUMBER is the name of a column in the AppSheet table that contains the spreadsheet row number).

View solution in original post

15 REPLIES 15

Steve
Platinum 4
Platinum 4

Thank you, but Iโ€™ve already read those. This is a bit of a different beast. My table sees new row entries every hour for 12 hours. After the 12 hours, I need to save a PDF with all of those rows, and those rows only. My table is setup so that the information required for each hour is a column. The hours are the rows. I need all of that logsheet info on 1 PDF. I canโ€™t figure out how to safe multiple rows at the same time.

Create a report ForEntireTable:
2X_c_c063cd50d045bd321e19f338ba2a82c8d1893589.png

Then, in your template, use a <Start>> expression like this:

<<Start: FILTER("My Table", ([_ROWNUMBER] > (MAX(My Table[_ROWNUMBER]) - 12)))>>

While that works, it prints every row seperate, not together in a grid or log. It copies the header over and over, 12 times.

Itโ€™s gonna print whatever your template tells it to print. What does your template look like?

I though more about it after I said that. Is it possible to have a START for each row in the table? My template is actually transposed of what the table data is. Table data is horizontal and template data is formatted vertically.

I honestly have no idea how to transpose a table. Maybe @Aleksi has an idea?

@Fred_Worrell The Start & End expression can create only rows dynamically. If you want to write the value, you need to read values one by one for example with a LOOKUP(). In your case that could work if the amount of values is always like 12.

Aleksi, I transposed the contents of the sheet to another using a formula. Now I need to figure out how to select only certain rows for the top half of the template and bottom half of the template. Any suggestions?

Actually, you wouldnโ€™t use <<Start>> at all. Instead, youโ€™d just hard-code every data value lookup. It would be very cumbersome.

<<LOOKUP("Row 1 Key", "My Table", "Key Column", "Data Column")>>
<<LOOKUP("Row 2 Key", "My Table", "Key Column", "Data Column")>>
<<LOOKUP("Row 3 Key", "My Table", "Key Column", "Data Column")>>
...

What would the LOOKUP youโ€™re talking about look like? Is it an indiviual START for each value? Not sure I get how LOOKUP would work here.

OK, so far I have the first row of data pulling into the template with the following
<<LOOKUP(MINROW(โ€œLOGโ€, โ€œKEYโ€, true), โ€œLOGโ€,โ€KEYโ€,โ€Operatorโ€)>>
Which works well. Trying to get any rows after that has, well, been a giant pain in the butt. I canโ€™t get the formula correct. Everything I try is an error. I canโ€™t just and a +1 to the MINROW to collect the next row key?

Nope. MINROW() produces a row key, not a number, so you cant just add one to it (unless the key is a number).

If your log sheet has a fixed number of rows, and all rows are replaced every day (or however often the log sheet is regenerated), such that you will always know how many rows the spreadsheet will have and what the spreadsheet row numbers will be, you can use the spreadsheet row numbers:

<<LOOKUP(2, "My Table", "_ROWNUMBER", "Data Column")>>
<<LOOKUP(3, "My Table", "_ROWNUMBER", "Data Column")>>
<<LOOKUP(4, "My Table", "_ROWNUMBER", "Data Column")>>
...

where 2, 3, and 4 are the actual spreadsheet row numbers, and _ROWNUMBER is that literal text (_ROWNUMBER is the name of a column in the AppSheet table that contains the spreadsheet row number).

Thank you very much for your help with this Steve and @Aleksi. I have it working perfectly. While this may seem like a cumbersome solution to an automatically generated sheet, it helps us in our goal for 100% paperless. So the final solution I settled with was this formula for the cells, individually, <<LOOKUP(2, โ€œMy Tableโ€, โ€œ_ROWNUMBERโ€, โ€œData Columnโ€)>>. This generates a report every 12 hours and removes the 12 lines it used for the save file. Thank you both again. Great ideas gentlemen!

Youโ€™re welcome

Top Labels in this Space