Display Field: Line Breaks

The DISPLAY field for a menu item allows for some crafty formatting. The one I have yet to figure out (read a lot of postings in the forums) is how to simply put the COUNT value under the Menu Name.

On a mobile device with a specific width of display, the long text seems to wrap ideally, but not in every use case. 

JJ_TechSupport_0-1671239251445.png

CURRENT CODE

 

CONCATENATE("Everyone (",COUNT(FILTER("People",ISNOTBLANK([FIRST_NAME])))+COUNT(FILTER("People",ISNOTBLANK([MATE]))),")")

 

DESIRED CODE (a method to insert a "Line Feed")

 

CONCATENATE("Everyone",{LineFeed},"(",COUNT(FILTER("People",ISNOTBLANK([FIRST_NAME])))+COUNT(FILTER("People",ISNOTBLANK([MATE]))),")")

 

TEST CODE & RESULTS

Thinking AppSheet expressions might follow JavaScript syntax, I first tried using "\n" and "\r". And while both of these methods PASS expression testing, they fail to produce the desired outcome.

 

CONCATENATE("Everyone","\n(",COUNT(FILTER("People",ISNOTBLANK([FIRST_NAME])))+COUNT(FILTER("People",ISNOTBLANK([MATE]))),")")

 

JJ_TechSupport_1-1671239891723.png

 

CONCATENATE("Everyone","\r(",COUNT(FILTER("People",ISNOTBLANK([FIRST_NAME])))+COUNT(FILTER("People",ISNOTBLANK([MATE]))),")")

 

 JJ_TechSupport_2-1671240586531.png

ALMOST WORKING PERFECTLY

Aside from the stray comma after the word "Everyone" -- I think using SPLIT() and specifying the "/" as my delimiter seems to work. 

 

SPLIT(CONCATENATE("Everyone/(",COUNT(FILTER("People",ISNOTBLANK([FIRST_NAME])))+COUNT(FILTER("People",ISNOTBLANK([MATE]))),")"),"/")

 

JJ_TechSupport_3-1671241171908.png

0 7 504
7 REPLIES 7
Top Labels in this Space