New Custom List

Modified on 2014/11/13 23:18 by Adam — Categorized as: Uncategorized

New Custom Lists are used to create a brand new list to be used in one or multiple forms.

See Also: List

Or Jump to: VisualAppend: formula

List contents have the ability to be modified on the fly when the form is open. An example of one would be a crop list. For a crop list you can add crops to the list and then they are there to select everywhere that list appears no matter what form it appears on. 

To create a new list, first hover over File

Image

Click New Custom List

Image

There are many things that can be done with lists. I will walk-through the steps of creating a simple list with 2 fields of information to store. 

First we will place 2 text Boxes in the design panel. 

Image

Select the first text box and name it. This is going to be the most important box. For our example, I am going to name it "InspectorName." We also want to set this as the Target Control

Important Notes about giving names to the data entry fields in lists:


Target Control will determine what text box is the one that drops down on the form and gives the list to select from. Only one field in a list can be the Target Control

Image

Do the same thing to the 2nd textbox. Select it and change the name field in the properties panel to "IDNumber"

Image

You will want to know what these fields are for when you start entering the data for the list.

The easiest way to do this is to place label next to the corresponding field.

Image

Lets place one more field that is named PhoneNumber and a label with the words "Phone Number" as the text.

Image

Now we should set the Tab Index's because this will set the order in which the columns appear in the list's grid view. Number them low to high to be placed left to right respectively. See Set Tab Index's

Image

Now lets save our list as Inspector List with Company wide access. See Save As

Image

Once it is saved, it will now appear on the Custom lists and be able to be placed on a form or grid

Image

Here is what this specific list will look like when used on a Form.

The edit pencil icon will appear when clicking on the field we assigned as the Target Control

Image

After Clicking on the pencil, you will see columns that pull their labels from the names of the text boxes in the list. 

Click on the plus button to start entering data.

Image

Here you can see that this is formatted exactly the same as how we formatted the List in the design area.

Fill in the information and click save.

Image

You will now be able to select the information from that Target Control text box, in this case Inspector Name

Image

After selected the rest of the information in your list will fill in automatically.

Image





VisualAppend:

In some situations you may want to append or add other list information from a non-target control to the target control drop-down. This is done by using the VisualAppend: command within a formula and is specific for use with list data.

In this example, I will add the ID Number contained in parentheses after the Inspector name in the drop down.

First let's open the list back up with File>Open List.

Image

Then click on your target control which is text box that becomes the drop-down on the form.

Image

In the text property, type the equals sign (=) to start the formula and then type out
=VisualAppend:if(IDNumber<>null){" (" + IDNumber + ")"} else{''}

Image

Breakdown of formula

=VisualAppend:
Visual Append: is the part of the formula that tells this value to append or add on to the end of the target control and is specific to lists.It must be placed at the beginning of the formula.

if(IDNumber<>null)
if the field called IDNumber doesn't contain a null value (contains something), then perform the following action in curly brackets{ }

{ " (" + 
Quotations indicate to add a literal value which in this case is a space and a open parentheses. and then add with actual addition or if the values are not all numbers then concatenate whatever is typed next.

IDNumber
The name of the field that we are pulling data from.

 + ")"} 
Finish by adding a literal closed parentheses to be shown visually. as well as end your if statement command with the closed curly bracket.

Save the List (File>Save)

Then open the form that you would like to use it on.(File>Open Form)

Delete the old list off of the Canvas and add a the Desired list again. See: Forms Designer - Delete

Save and Publish the form the open to test the results.

Here is what out form looks like when generated. Notice the Id number is now appended to the list drop-down.

Image

See Also: