Add search function inside form - Built-in

Hello, One of my form in my App is called (Customer) 

is there a built-in function to add a search box where users can search and filter through customer names and an add button where they can add a new customer info. see kindly below picture.

Thanks indeed

777.jpg

0 3 526
3 REPLIES 3

Yes.  It relies on using a Ref column.  In your app you have the Customers table and then some OTHER table that requires Customer to be assigned to its rows - let's say an Orders Table which has a Customer column.

This Customer column in the Order table would be configured as a Ref column and you would set the source table as Customers.  Set the allow other values property to ON.  You should automatically get a dropdown view like that shown in your post.

CAUTION:  I believe by default you should automatically see all the Customers table rows in the dropdown list.  However, I occasionally run into problems with this so I always explicitly add a Valid_IF expression similar to this:  Customers[Key Column] - note you MUST use the Key Column - i.e. whatever you have set as the key column in the Customers table.

I hope this helps!

@WillowMobileSys 

Thank you so much, do you know how to show/ide the blue Add button that allows adding a new item in that coordinator list. see plz below image.

add.jpg

I implied in my previous post that with a Ref column you could turn ON/OFF the "Allow other properties".  Actually with a straight Ref type you don't have that control in the column - only at the Table level (i.e. if Add was disabled for the Table the the Add would be removed from the Ref column dropdown.

You CAN gain control over the button by making 2 adjustments to the column:

1)  Define the column as Enum and Base Type of Ref.  See image below.

2)  Move your Valid_If expression to the Suggested Values property (leave Valid_If blank)

Note that with above changes,  the "Allow other values" property doesn't impact the dropdown.  But, you can turn on/off the "New" button by enabling/disabling the Add capability.  You can do that at the Table level or for a Slice.

I hope this helps!

Screenshot 2023-05-10 at 6.06.01 PM.png