Concatenating with line breaks, with blank columns ignored (data in ascending order 1 to 10)

Aadam
New Member

I have a formula which concatenates queries (from construction company to employer) so that it appears with line breaks in a workflow pdf report. I used to have the queries just in one query column, but I am now using a Hyperlink to google form response for the client to be able to respond from the workflow email. The problem is I canโ€™t figure out how to keep line breaks as the url is referencing to the cell value (so in the google sheet cell there could be Query1 line break Query 2 line break Query 3 etc). Itโ€™s working now the way I want it to, but how do I adapt formula to ignore lets say query5 to query10 if there is no data filled in there? This is so that I donโ€™t get unecessary spaces below queries in my reports. Note. Currently the queries build from 1, so if there is 3 queries then there will be Query1, Query2, Query3 blank columns for the remaining Query4 to Query10.

Appsheet Formula currently using below;

CONCATENATE( [QUERY1],"
โ€œ,[QUERY2],โ€
โ€œ,[QUERY3],โ€
โ€œ,[QUERY4],โ€
โ€œ,[QUERY5],โ€
โ€œ,[QUERY6],โ€
โ€œ,[QUERY7],โ€
โ€œ,[QUERY8],โ€
โ€œ,[QUERY9],โ€
",[QUERY10])

Apolgies I found a few topics covering line breaks, but could not find how to ignore blank โ€œcolumnsโ€

0 3 179
3 REPLIES 3

@Aadam Can you please try this and check whether it helps

CONCATENATE(IF(ISNOTBLANK([QUERY1],([QUERY1],"
โ€œ),"")),IF(ISNOTBLANK([QUERY2],([QUERY2],"
โ€œ),"")),IF(ISNOTBLANK([QUERY3],([QUERY3],"
โ€œ),"")),IF(ISNOTBLANK([QUERY4],([QUERY4],"
โ€œ),"")),IF(ISNOTBLANK([QUERY5],([QUERY5],"
โ€œ),"")),IF(ISNOTBLANK([QUERY6],([QUERY6],"
โ€œ),"")),IF(ISNOTBLANK([QUERY7],([QUERY7],"
โ€œ),"")),IF(ISNOTBLANK([QUERY8],([QUERY8],"
โ€œ),"")),IF(ISNOTBLANK([QUERY9],([QUERY9],"
โ€œ),"")),IF(ISNOTBLANK([QUERY10],([QUERY10],"
โ€œ),"")))

Aadam
New Member

Hi Jyothis, thanks for the response.

After a few attempts I noticed that the workflow pdf report and the workflow email template (where formula is in table) was doing it own cropping and not extending past empty columns, so I have left the formula as is without the IF(ISNOTBLANK) so that the formula stay a bit smaller.

Screenshot below of report;

I picked up another issue in the google form it was taking the number 10 as being 1 in the url link. So I reduced to 9 queries only.
https://docs.google.com/formsblahblah918=A1 A2 A3 A4 A5 A6 A7 A8 A9 (%0A%0AA10 This last part was giving a 1 value. in google form and giving me the same query as text value in Query 1)

I think this is a question for another forum.

Steve
Platinum 4
Platinum 4

Try this:

SUBSTITUTE(
  CONCATENATE(
    LIST(
      [QUERY1],
      [QUERY2],
      [QUERY3],
      [QUERY4],
      [QUERY5],
      [QUERY6],
      [QUERY7],
      [QUERY8],
      [QUERY9],
      [QUERY10]
    )
    - LIST("")
  ),
  " , ",
"
"
)
Top Labels in this Space