AppMachine Help Center

How can we help you?


Manipulate data presentation

This tutorial explains how to manipulate data for a better presentation in the app.

Remember that you have to type these values in the "source" of the Layout Editor.


<label field="date" type="date" format="dd" field="pubdate" fontsize="17" textColor="support" />

Date and Time

d : Day of the month (1 – 31)

dd : Day of the month in two digits (01 – 31)
ddd : Abbreviated name of the day
dddd : Full name of the day

M : Month (1 – 12)
MM : Month in two digits (01 – 12)
MMM : Abbreviated name of the month
MMMM : Full name of the month

y : Year without the century (2009 is displayed as 9)
yy : Last two digits of the year (2009 displayed as 09)
yyyy : Full year including the century (2009)

h : Hour (1 – 12)
hh : Hour in two digits (01 – 12)
H : Hour in 24-hour format (0 – 23)
HH : Hour in 24-hour format in two digits (00 – 23)

m : Minute (0 – 59)
mm : Minute in two digits (00 – 59)

s : Seconds (0 – 59)
ss : Seconds in two digits (00 – 59)

t : First character of AM or PM
tt : Both characters of AM or PM

z : Time zone hour (+6)
zz : Time zone hour in two digits (+06)
zzz : Time zone hour and minutes (+06:00)


<container direction="horizontal" visible="AM:HasValue([{data:starttime}])" only shows the container when the item starttime has a value. When starttime is NULL the container will be invisible.


value="AM:TruncateWithDots([{data:Description}],[70])" shows the first 70 characters followed by two dots of the field Description.

value="AM:Upper([{data:column1}])" shows the text of column1 in capitals

value="AM:Lower([{data:column1}])" shows the text of column1 in lower case


Was this article helpful?
4 out of 4 found this helpful
Have more questions? Submit a request


  • Avatar

    Also this works! Where 00 are digits for a better lay-out

    value="AM:FormatDate([{data:list.dt_txt}],[dd MMM HH:00])"

  • Avatar
    Fernando Sérgio

    current time in UTF => {am:now}

  • Avatar
    Fernando Sérgio

    How can I set background-color if a data-field is equal to some-value ?

  • Avatar

    To set background-color you need a data-field containing i.e. a color name

    You place an image and set the background-color and dimensions you want, you remove the field="", so there is no image, only a background.

    With the next statement you can switch on an off the background-color

    When your field colorname contains the string Black, the background-color is black.

    With FrameLayout you place your content on top of the background.

    For more colors you need more images and more statements.

    <image name="imageblack" height="1000" label="" clickable="false" backgroundcolor="#000000" parallax="100" scaletype="" halign="center" valign="" visible="AM:Equals([{data:colorname}],[Black])"></image>

  • Avatar
    Adaberemchi Aja-Onu

    How is Distance Formated?

  • Avatar
    Johnny Boersma

    Distance is formated in km.

  • Avatar
    Gerard van der Heide

    How to get dd-mm-yyyy HH:mm:ss as currentdate in email subject field in Form(beta) block....??? Can someone help me out. I tried different ways, none worked out.

  • Avatar

    Try this {device:currentdate} it will be effective in the simulator now, and in the previewers after the next update. It is a new feature.

  • Avatar
    Gerard van der Heide

    My emial subject string in the logic of this Form(beta) looks like this:
    So, I added {device:currentdate} in between @. No results. I did this a couple of days ago as well with the same results. So, there must be something which I do wrong.........???

  • Avatar

    @ Gerard Dutch? I now understand wat you are doing! You use a Form and Logic! That's not the right combination! I use a screen-blok and logic for testing and then it works well with {device:currentdate}! You can invite me in your app and I will help you!

  • Avatar
    Gerard van der Heide

    Yeah Dutch Harry. Ik ga het even met de screen proberen. Lukt t niet dan kom ik bij jou terug oke?

  • Avatar
    Michel Kulk

    Is hier al iets over bekend? ik probeer het ook al een poosje maar kom er niet uit.