Add text to data only in Deck view

Howdy! I'm using a Deck view and would like to add some text to column data but ONLY in this Deck view. In my other Views, the Header shows up so User knows what the data means, but in Deck view, there is no header, so I want to add text so it displays "35 days away".  I know CONCATENATE([Days<], " days away") but I don't know how to get it to only work in a Deck view. TYVM!

It would be very nice to have a little more control, and a couple more Rows available for Deck View.

Screenshot 2022-08-25 8.11.40 AM.png

Solved Solved
0 8 310
2 ACCEPTED SOLUTIONS

If I'm understanding correctly, this should be pretty easy.

First, I assume that this Deck view links to Detail views and that the Detail views utilize the manually set "Column order" (hence, columns not designated in the column order do not appear in the Detail view).

Just make up a virtual column to display your CONCATENATE([Days<], " days away") expression, include that in the slice (if necessary), and then make that column either the Secondary header or the Summary column (UX settings for your Deck view).  If you already have other columns designated as the Secondary and Summary columns, put whatever it is that you have in one of those in the CONCATENATE expression to combine them.  
Hope that works for you!

View solution in original post

Thanks everyone!  For now, I'm using the easy route. I made a Virtual Column (text type) [DateDayDaysAway] with CONCATENATE([Date & Day]," ",[Days <]," days away") which displays exactly what I need "9/29/22 = Thu  35 days away".  Now I can display other useful data in the spot that was freed up. This is perfect. TYVM!

There is something odd happening with this expression, I added 4 more spaces (spacebar) to push "34 days away" a little further away from [Date & Day] but it ignores my extra spaces and will only add one space.

 

Screenshot 2022-08-25 9.28.25 AM.png

View solution in original post

8 REPLIES 8

There are a couple of options and it depends on how you implement your views.

If you are in the habit of explicitly listing the columns to show in each view, then create a new column use the CONCATENATE() function to combine the existing data with any additional data you wish and then change the Deck View to replace the desired field with the new column.  (By the way, there is a CONCATENATE shortcut,  You can use "&" to join data - e.g. [a] & " " & [b]  will result in "a b")

If you typically rely on the default view column list and use Show_If to show/hide columns, then you would want to, in addition to the above, add a Show_If in the new column of CONTEXT("ViewType") = "Deck".  This will make sure the new column only shows in Deck views .

Thank you WMS!!  Thanks for the CONCATENATE shortcut, I would have never known, cool!

Your CONTEXT info is great, and what I asked for, TYVM, but I marked Kirk's advice as SOLUTION because it's simple and easy to implement.  As usual, I should have thought more about my options before posting my question. Virtual Columns are awesome! Thank you all!

Another way to deal with spacing issues is to use Japanese spaces:
https://www.googlecloudcommunity.com/gc/Tips-Tricks/Adjusting-table-spacing/m-p/356044
One more possible option is to intersperse a ZERO WIDTH SPACE character (CHAR(HEX2DEC(โ€œ200Bโ€) in a Google sheet) between each space you want. I haven't tried it but interspersing with a concatenate expression may make it possible to have a series of spaces that AppSheet will not treat as a single space. 

Great info, TYVM!!

I said I hadn't tried but, in fact, I did something similar.  Please see this:
https://www.googlecloudcommunity.com/gc/Tips-Tricks/How-to-make-a-mirrored-histogram-in-AppSheet/m-p...

If I'm understanding correctly, this should be pretty easy.

First, I assume that this Deck view links to Detail views and that the Detail views utilize the manually set "Column order" (hence, columns not designated in the column order do not appear in the Detail view).

Just make up a virtual column to display your CONCATENATE([Days<], " days away") expression, include that in the slice (if necessary), and then make that column either the Secondary header or the Summary column (UX settings for your Deck view).  If you already have other columns designated as the Secondary and Summary columns, put whatever it is that you have in one of those in the CONCATENATE expression to combine them.  
Hope that works for you!

Thanks Kirk!  This is the best solution for me, it's simple.  I do need to learn more about the CONTEXT to change things around based on View, etc, but simple is perfect for now. I actually figured this out just before you posted, I love Concatenating data like this to save space & make my Apps faster/more efficient to use.  TYVM!!

Thanks everyone!  For now, I'm using the easy route. I made a Virtual Column (text type) [DateDayDaysAway] with CONCATENATE([Date & Day]," ",[Days <]," days away") which displays exactly what I need "9/29/22 = Thu  35 days away".  Now I can display other useful data in the spot that was freed up. This is perfect. TYVM!

There is something odd happening with this expression, I added 4 more spaces (spacebar) to push "34 days away" a little further away from [Date & Day] but it ignores my extra spaces and will only add one space.

 

Screenshot 2022-08-25 9.28.25 AM.png

Top Labels in this Space