LINKTOFORM or LINKTOFILTEREDVIEW

Hi all,

Can anyone help me figure out how to have an action button doing:
If data exists then LINKTOFILTEREDVIEW else LINKTOFORM?

Many thanks

Matt

LINKTOFORM() is to be used when the user can/ needs to fill a new form and thereby create a new record based on certain fields from the existing record called say record A (in a detail/table view) be prefilled in the new record B form.

Both the record A and record B can be in the same table or in different tables.

Presume record A has fields [Name] with value John and [Surname] with value Doe, and [Office Address]with filled with 1, Office Road, Mars Town. Tapping the LINKTOFORM() action can take the user from detail /table view of record A to a new form (say record B) either in the same table or in different table with say [Name] and [Surname] fields prefilled in record B. The [name], [Surname] fields are prefilled in the new rcord with the help of LINKTOFORM(0 action construct.

LINKTOFILTERED() view can be used for navigating from a record in one table to another view with conditional filtering of records of another or the same table being presented in the new navigated view.

So if an existing record has an enum of [Natural Wonders] with options as “Oceans” and “Mountains”, and the user sets “Oceans” in the enum, the new navigated summary view may have records of “Ocean” names.

The descriptions of these actions in the article below explain the actions well

The sample app sare alos useful
https://www.appsheet.com/templates/This-app-shows-how-to-filter-your-data-using-a-form?appGuidString=c6859960-6635-4cdd-b0ac-92a42fbb3a71

https://www.appsheet.com/templates/This-app-shows-how-to-link-to-a-form-and-fill-in-default-values?appGuidString=ad497f8e-7d8a-4664-8a4a-43c202bb6126

1 Like

To open one existing row in a form view:

1 Like

Third answer on your unformulated questiion after gooroo`s :slight_smile:
What about next expression (?):
IF(ISBLANK([Data Field]), LINKTOFORM(…), LINKTOFILTEREDVIEW(…))

Read next, pls

For exmpl:

IF(
	ISBLANK([Data2]),
	LINKTOFORM("ForTests_Form","Data2",""),
	LINKTOFILTEREDVIEW("ForTests", [Data2] = [_THISROW].[Data2])
)
3 Likes

Hey guys.

Thanks for your replies.
I will try the if with linkto… and let you know if this works.
This is indeed an answer to my question

1 Like

Hey,

The IF formula worked a charm.
I did not think it would work with the LINKTO… expression.

Many thanks mate

3 Likes