How to create a button

Im currently making an app and i have a “Communications” tab
in there i have a message and subject field but i want to make it so there is a button(with a send function, currently non-functional) next to all of them or one that uses a selected message.
In the future i will implement a send function using an email service.
Read almost the entire documentation on gui, commands, actions and still nothing.
How do i create a button in a tab in the application.alan file?

Hi there officer,

The idea of the Alan application modelling language is not to build screens, but application models. So you should focus on what your application should do, not how it looks like. The generated user interface can and will change in the future, as it has been doing over the last 14 years.

Having said that, there are application features that (currently) lead to buttons being generated. Please look into actions and commands for that.

An action looks like this:

'[name of the action]': action {
     'parameter': text @default: ^ . 'property holding current value' // example parameter
} as $ => update /* you can put a path to a node here, no path means this node */ (
    'property holding current value' = $ . 'parameter'
) // => next action ( update , switch, walk, execute, ignore )

// the same node should contain at least:
'property holding current value': text

An action runs in the browser, with the same rights and capabilities as a normal user, so normally a user should be able to do the same things an action does. It’s basically a user helper / automation. There are also commands, those are being run on the server and can do more or less the same as an action, but they have more rights (they can do everything when execution is permitted) and are not able to require user interaction, so everything done must be done correctly without missing or incorrect data - so the implementation is stricter. A command is basically one single transaction.

A command looks exactly like an action, but with command instead of action and:

  • between command and the { } parameters block you can have a can-execute: expression to manipulate execution rights
  • everything that is part of the command implementation will be fully performed when the execution right are secured. So without regard of other read / update / creation / deletion rights.
  • creation of nodes (with create or ensure) should set all properties
  • all implementation parts of a command are run at the same time, coming from the same source state, whereas action implementation blocks ( the parts in de example starting with => ) are run one by one.

Let me know if this helps, Rick

Thank you, I’ve been looking wrong at the core idea of the language.