I’m new here (1 hour playing after listening to the 1 hour demo) and can’t find out how to add a field in the list of a page form (with many-to-many relationship table). I have the first name but not the last name displayed.
In the related form, both first and last name have the option “Include in list”.
Follow the steps below to include your Last Name field in the list.
Because you are working with a many-to-many relationship, you may find this link helpful, there is also a sample StudyGroups.fdf that you can download and import and is using a many-to-many relationship.
Select Visual in the menu.
Select Forms in the sub-menu. (All your form records will be listed here, I am not sure if you originally added your forms through the Form Wizard or if you added them here, so just letting you know where your form records are after saving them through the Form Wizard.)
Thank you, but this is not the issue.
The relation many-2-many work perfectly.
I’m using a form who use a ForeignKey (UtilisateurRecuDeKey) with “_Lookup” type and based on the form “Utilisateurs”. The form “Utilisateurs” has the two fields name with the option “Include in list” enabled. But only the first name is displayed in the list for the “Tips” form.
That’s good the many-to-many relationship works. Just to clarify, you have a First Name field and a Last Name field and both fields are included in the list? And are you meaning in the lookup list (dropdown) for the Tips form that only the first name is being displayed? If this is the problem I know how to help you, just getting some more clarification.
When you create a _Lookup type, Five will take the first logical field in the referenced form and display this in your lookup. For you it is taking the First Name field.
Here are my members, inclusive of first name and last name.
To have the First Name and the Last Name fields both displayed, you will need to change your display type to a _LookupQuery and write a small amount of SQL to concat these fields together. When you are writing your query please ensure to use the values in the ID fields on the Table form, for example, Data Source ID and Field ID.
Type in your query. I have added an example below.
Note: When you add a _LookupQuery, at a minimum you need a primary key field and a value field, Five will hide the primary key field in your application.
SELECT
MemberKey,
CONCAT(FirstName, ’ ’ , LastName) AS Name
FROM
Member
Tip: You can click the Run button here to check your results.
Just for your knowledge, the reason we allow more than one field in the list is these will become the fields in the list. So if you look at the above image, the Memberships form has Member and Member No included in the list so they are visible on the left where the list of records will be displayed.