Show a document in a form view?

Is there a way to show a document in a form view? I cannot seem to find that answer anywhere.

This particular app I’m creating is a form, data is input & a sum() calculation is done at the end. What I would like to see is, based on the calculation at the end of the data entry, one of three documents shown/be made available to the end user.

So for example, if the summation is 0-2, then document 1 is shown (or they press a button to open the document). If the sum = 3-4, document 2 is shown and >5, document 3 is shown.

I’ve tried to have the documents show as a ref table from the primary form, but still cannot get the buttons to link to the document.

Help/suggestion(s)/laughter would all be helpful. :wink:
Thanks!

One idea is to create a virtual column whose value is a formula at the end of your form. The associated expression would look something like this;

IFS(
AND([Sum] >= 0, [Sum] =< 2), “Document 1 URL”,
AND([Sum] >= 3, [Sum] =< 4), “Document 2 URL”,
AND([Sum] >= 4, [Sum] =< 5), “Document 3 URL”
)

If you plug something like the above into the formula field of a virtual column titled Document at the end of your form it should accomplish what you’re looking for.

This is just one way to create what you’re looking for, I’m sure someone looking at this thread has a neat solution as well. Let’s hear it!

Thanks @Hayden - would that be a URL file type?
I did plug in LINKURL() before each of the document URLs (created from a google ‘web share’ doc), but that didn’t seem to have any effect.

I think in this case you would set the data type to URL under Data > Columns and it should interpret the expression output as a navigable URL.

Otherwise you may look at enclosing the URL in a HYPERLINK() expression.

Here’s some info on how appsheet can process URLs in various ways https://help.appsheet.com/en/articles/2357254-hyperlink

LINKURL() extracts a URL from an existing hyperlink; it does not create a URL or hyperlink:

Use HYPERLINK() to construct a hyperlink for use within a column of type Show in your form to display a link to the resulting document:

Try something like this:

HYPERLINK(
  IFS(
    ([Sum] < 3),
      "document1-url",
    ([Sum] < 5),
      "document2-url",
    TRUE,
      "document3-url"
  ),
  "Click here for results."
)
3 Likes