Set Field Datasource March 15, 2020, 11:48:50 AM Hello,I am trying to have a field in a entry form to be populated from a query.I use a textbox and select the "AutoCompleteDataSource" where I selected a Custom SQLin the Sql Query editor I enter the following "SELECT DISTINCT id AS value FROM tbl_master WHERE is_current =1I tested it and it indeed return a "value" of 8.What do I have to do for this value to be enter in the field automatically?Thank you. Quote Selected
Re: Set Field Datasource Reply #1 – March 15, 2020, 03:12:22 PM @cpfavre please note that AutoCompleteDataSourrce is used to load suggestions for end-users as they input data in the current field. it is not used to automatically select data from the database and load it on the input. If you want a value to be loaded on add page when the page loads, then use DefaultValue configuration. Quote Selected
Re: Set Field Datasource Reply #2 – March 15, 2020, 04:07:50 PM Thank you, noted.Can I enter a query in the default value? and how? Is there any documentation / video?What I am asking does not seem out of the ordinary? :-) or maybe there are other ways to achieve this.Thank you. Quote Selected
Re: Set Field Datasource Reply #3 – March 16, 2020, 01:11:25 AM @cpfavre You can. When you set the default value to [Select From Database], a window pops up for you to enter your query. Quote Selected
Re: Set Field Datasource Reply #4 – March 16, 2020, 02:41:11 PM Hi, I dont see any option in the "DefaultValue", see attachement. Quote Selected
Re: Set Field Datasource Reply #5 – March 16, 2020, 05:46:47 PM Works with the classic version and not with the vue. Quote Selected
Re: Set Field Datasource Reply #6 – March 16, 2020, 07:56:21 PM @cpfavre yeah, the classic version is ahead of vue version. Quote Selected