Loading…
Loading…
A form can fill fields with another system's data: you type a person's number and their name, position and area show up. For that an admin connects the system as a data source and defines the lookups forms may ask it. Both are managed in Settings.
A source is a SQL Server database or a web API.
Authorization and the value Bearer followed by the
token. Automations can send it data too.Passwords and header values are kept encrypted and never shown again. Editing a source, leave them empty to keep the saved ones. Check connection says whether the source answers and, if not, why.
A SQL Server source must sign in with an account that can only read: the
db_datareader role on its database and nothing else, no server roles, no right
to run procedures and no reach into linked servers. SelfForm checks every query,
but what truly keeps it from doing more is the account. An API automations send
to, on the other hand, needs to take what they send. Whoever builds an
automation only sees the web APIs' names, never their address nor headers.
A web API can never point at SelfForm's own server (localhost, 127.0.0.1)
nor at addresses such as 169.254.169.254, which in the cloud hold the server's
own data; not through a name leading there either. Addresses on your internal
network can be used.
A lookup is a set question to a source, with a name. Whoever builds a form only sees what each takes and the columns it answers with, never its query.
SELECT or WITH. Its
parameters take an @, as in @number, and are always sent as values, never
pasted into the text. It can only read: outside quotes it takes no second
query nor words such as INSERT, UPDATE, DELETE, EXEC or INTO, and
nothing it changes in the database is kept.people/{number}, asked with a GET. When the answer holds the
results inside another object, say where, data.items for instance. The API
answering that it doesn't exist counts as no results.area.name.An answer brings at most 50 rows. Try the lookup asks for a value for each parameter and shows what it found, or the problem the source gave.
In the builder, a text, number, email or phone field can look up with one of those lookups:
Entering a record, you type the value and leave the field or press the magnifier. One row found fills the fields; several show a list to choose one from; none says so. Leaving the field looks up again only if the value changed. Filled fields can be corrected before saving.
Only whoever can enter the application's records looks up, and a field they can't see or change is never filled. When the source fails, the form says so without technical details.
An archived source or lookup is kept as it was. While it is, forms using it can't run it and say it isn't available, and nothing is sent to it; restored, they work again.