> Le 16 sept. 2017 à 03:32, Jeremy French via 4D_Tech <[email protected]> a > écrit : > > [...] > See "Displaying the result of an SQL query in a list box” at: > http://doc.4d.com/4Dv16R3/4D/16-R3/Managing-List-Box-Objects.300-3218275.en.html#429187 > > <http://doc.4d.com/4Dv16R3/4D/16-R3/Managing-List-Box-Objects.300-3218275.en.html#429187>
It says "for example, the fifth column, its name is sql_column5 and its header name is sql_header5" but doesn't mention that, if a second listbox is filled the same (SELECT...INTO LISTBOX), 4D restarts objects naming from 1 so you get duplicate names in the form. Duplicate names can also be obtained with LISTBOX INSERT COLUMN, while doc says "Note: Object names must be unique in a form. You must be sure that the names passed in the colName, headerName and footerName parameters are not already used. Otherwise, the column is not created and an error is generated." <http://doc.4d.com/4Dv16R3/4D/16-R3/LISTBOX-INSERT-COLUMN.301-3218314.en.html> Knowing the listbox name unicity is correctly ensured by 4d in the form, I create names with listbox name as prefix: myLB myLB_h1, myLB_h2... headers myLB_c1, myLB_c2... columns myLB_f1, myLB_f2... footers <http://forums.4d.com/Post/FR/19409974/1/19409975#19410038> So obvious. -- Arnaud ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

