Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When a user fills out a form, the more data that is available and prefilled onto the form, the less work the user must do. Generally a form is prefilled with client data that aligns to specific roles (Owner 1, Owner 2, Beneficiary 1, Contingent Beneficiary 1, etc.). Alternative Data Buttons can be implemented to give users the ability to select any client data that has been sent to a form, and prefill fields with it. In other words, Alternate Data Buttons lets users change field data on the fly, just by selecting a client's name. 

...

Suppose we want to add a custom button next to the field 1own.H.Addr123, that will allow the user to populate all Home Address related fields. And let's say the related fields are:

  • 1own.H.Addr123

  • 1own.H.Addr4

  • 1own.H.City

  • 1own.H.State

  • 1own.H.Zip

  • 1own.H.Country

 The way to accomplish this is by calling the QuikFormsEngine's AddCustomAltDataButton method, and passing a CustomAltButton object that will be described below. Here's a sample code snippet:

VB.NET

Sample Code
Code Block
languagevb
objQFE.AddCustomAltDataButton(New CustomAltButton() With {
                                          .FieldName = "1own.H.Addr123",
                                          .Title = "Select your Home Address",
                                          .Groups = New List(Of CustomAltButtonGroup) From {
                                               New CustomAltButtonGroup() With {
                                                  .GroupLabel = "Account 1",
                                                  .Fields = New List(Of CustomAltButtonField) From {
                                                  New CustomAltButtonField() With {
                                                          .Name = "1own.H.Addr123",
                                                          .Value = "Rivadavia 2134"
                                                      },
                                                      New CustomAltButtonField() With {
                                                          .Name = "1own.H.Addr4",
                                                          .Value = "Rincon 20"
                                                      },
                                                      New CustomAltButtonField() With {
                                                          .Name = "1own.H.City",
                                                          .Value = "CABA"
                                                      },
                                                      New CustomAltButtonField() With {
                                                          .Name = "1own.H.State",
                                                          .Value = "BA"
                                                      },
                                                      New CustomAltButtonField() With {
                                                          .Name = "1own.H.Zip",
                                                          .Value = "1020"
                                                      },
                                                      New CustomAltButtonField() With {
                                                          .Name = "1own.H.Country",
                                                          .Value = "Argentina"
                                                      }
                                                  }
                                              },
                                               New CustomAltButtonGroup() With {
                                                  .GroupLabel = "Account 2",
                                                  .Fields = New List(Of CustomAltButtonField) From {
                                                  New CustomAltButtonField() With {
                                                          .Name = "1own.H.Addr123",
                                                          .Value = "3625 Del Amo Blvd"
                                                      },
                                                      New CustomAltButtonField() With {
                                                          .Name = "1own.H.Addr4",
                                                          .Value = ""
                                                      },
                                                      New CustomAltButtonField() With {
                                                          .Name = "1own.H.City",
                                                          .Value = "Torrance"
                                                      },
                                                      New CustomAltButtonField() With {
                                                          .Name = "1own.H.State",
                                                          .Value = "CA"
                                                      },
                                                      New CustomAltButtonField() With {
                                                          .Name = "1own.H.Zip",
                                                          .Value = "90501"
                                                      },
                                                      New CustomAltButtonField() With {
                                                          .Name = "1own.H.Country",
                                                          .Value = "USA"
                                                      }
                                                  }
                                              }
                                          }
                                      })

...

Default Alternate Data Buttons display when data is provided to the form and is available for selection, and are displayed by default. If you want to suppress Default Alternate Data Buttons from appearing, set the HTMLShowAltDataButton HTMLShowAltDataButtons property to FALSE. Note that when the SetFormReadOnly property is set to TRUE, Default Alt Data Buttons will not display.

...


When the Execute method runs, the Quik! Forms Engine will look for any fields added that have a parent field name of "altclient" between 1 and 20 and treat them like any other client record. The only difference is that forms are not designed with fields that start with "##altclient" as a parent field so these records will never prefill the form. The main reason to use "altclient" as the parent name is to ensure your alternate records are calculated like any other field (i.e. "1altclient.FullName" will be created automatically based on the values for "1altclient.FName" + "1altclient.MName" + "1altclient.LName").
NOTE: If you need to add more than 20 alternative data records to the form, you can use any parent field naming convention that is not already in use (e.g. "21alt" or "record4") but these records will not be output to the form with any calculated values, just the values you supply.