Function | Example | Description |
HasValue | visible="AM:HasValue([{data:imageurl}])" | The image is visible when the 'imageurl' field has a value, otherwise it is hidden |
am:userrole | Shows an element in the layout if the registereduser role is boss. | |
visible="AM:userrole([boss])" | ||
- unauthorized | ||
- authorized | ||
- customer | ||
- employee | ||
- manager | ||
- boss | ||
Upper | value="AM:Upper([{data:title}])” | Uppercase the titel “MY TITLE” |
Lower | value="AM:Upper([{data:title}])” | Lowercases the title “the title” |
TruncateWithDots | value="AM:TruncateWithDots([{data:description}], [80])” | Cuts the “description” text off at 80 characters and shows “dots” at the end. |
Equals | visible=”AM:Equals([{data:category}],[men])” | Shows the label if the “category” is “men” or “man”. |
Or | visible="AM:Or([AM:Equals([{data:color}], [Green])], [AM:Equals([{data:color}], [Yellow])])" | Will display the label when the color is Green OR Yellow |
ValueWithFallBack | value="AM:ValueWithFallback([{data:category}], [Train])" | If there is no 'category', fallback to the text 'Train' |
2 params | ||
FormatDate | value="AM:FormatDate([{data:starttime}],[HH:mm])" | Will show the time (like 13:45) |
value="AM:FormatDate([{data:date_and_time_picker}],[dd, MM, yyyy])" | Will show the date (like 21-08-1984) | |
ValueWithFallBack | value="AM:ValueWithFallback([{data:description}], [{data:introtext}], [No description available] )" | Try {data:description}, if empty, try {data:introtext}, also empty? Use 'No description available' |
3 params | ||
Replace | value="AM:Replace([{data:description}], [Hi], [Hello])" | Finds and replaced 'Hi' with 'Hello' in the field 'description |
HtmlDecode | value="AM:HtmlDecode([Small > big])" | Html decode the given text. Example: 'Small > big' will print 'Small > big' |
TruncateWithDots | value="AM:TruncateWithDots([{data:description}], [80])" | Cuts the 'description' text off at 80 characters and shows "dots" at the end |
Not | visible="AM:Not([AM:Equals([{data:category}], [Red])])" | Label is visible when the field 'category' is anything except the value 'Red' |
Currentdate | Show the current date in a label | |
<date value="{device:currentdate}" margin="5" format="yyyy-MM-dd hh.mm.ss" /> | ||
AND | visible="AM:AND([AM:Equals([{data:color}], [Green])], [AM:Equals([{data:color}], [Yellow])])" | Will display the label when the color is Green AND Yellow |
AM Functions Print
Created by: AppMachine Support
Modified on: Thu, 17 Mar, 2022 at 4:04 PM
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.