Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Question about cloning forms

Questions related to customising nuBuilder Forte with JavaScript or PHP.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Question about cloning forms

Unread post by kknm »

I executed in parts of 2 lines from the request for zzzzsys_object from the cloner and the objects appeared on the form.!
But...
request for zzzzsys_ tab gave an error -

Code: Select all

INSERT INTO zzzzsys_tab (zzzzsys_tab_id, syt_zzzzsys_form_id, syt_title, syt_order, syt_help, syt_access, syt_json) 
VALUES ( '65f49e5ade8eb9f', '65f496a65bc8011', 'Main_clone', '10', NULL, NULL, NULL );
MySQL said: Documentation

#1062 - Duplicate entry '65f49e5ade8eb9f' for key 'PRIMARY'
Here is the complete cloner code -

Code: Select all

- nuBuilder cloner SQL Dump
-- Version 1.21
-- Generation Time: March 15, 2024 10:15:38 PM

-- Form Description: ДСЗ 1 - Отсев
-- Form Code: fro
-- Form Table: frots
-- Form Type: browseedit


--
-- zzzzsys_tab
--

INSERT INTO zzzzsys_tab (zzzzsys_tab_id, syt_zzzzsys_form_id, syt_title, syt_order, syt_help, syt_access, syt_json) 
VALUES ( '65f49e5ade8eb9f', '65f496a65bc8011', 'Main_clone', '10', NULL, NULL, NULL ); 

--
-- zzzzsys_object
--

INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_access_condition, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json) 
VALUES ( '65f49e5adeac7dc', '65f496a65bc8011', 'frots', 'lookup', 'fro_data', 'Дата начала смены', '65f49e5ade8eb9f', '10', '10', '150', '180', '20', '1', 'left', '0', '0', NULL, NULL, NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', 'tab_data', 'tab_data', '0', '', '5e8a26a53ce5f49', '', '', 'tabel', '', '', '', '', '', '', '0', 'D|dd-mm-yy', 'datetime-local', NULL, '', NULL, NULL, '0', '', '', '', '', '', '', '', NULL, NULL ); 
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_access_condition, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json) 
VALUES ( '65f49e5adeaf3fe', '65f496a65bc8011', 'frots', 'input', 'fro_vrem', 'Время', '65f49e5ade8eb9f', '20', '40', '235', '95', '20', '1', 'left', '0', '0', NULL, NULL, NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', 'D|dd-mm-yy', 'time', NULL, '', NULL, NULL, '0', '', '', '', '', '', '', '', NULL, NULL ); 
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_access_condition, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json) 
VALUES ( '65f49e5adeb0fa9', '65f496a65bc8011', 'frots', 'input', 'fro_pit', 'Питатели', '65f49e5ade8eb9f', '30', '70', '210', '120', '20', '1', 'left', '0', '0', NULL, NULL, NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', '', 'text', NULL, '', NULL, NULL, '0', '', '', '', '', '', '', '', NULL, NULL ); 
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_access_condition, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json) 
VALUES ( '65f49e5adeb33a3', '65f496a65bc8011', 'frots', 'input', 'fro_10', '10 (2)', '65f49e5ade8eb9f', '40', '100', '270', '60', '20', '1', 'right', '0', '0', NULL, NULL, NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', 'N|1000.00', 'number', NULL, '', NULL, NULL, '0', '', '', '', '', '', '', '', NULL, NULL ); 
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_access_condition, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json) 
VALUES ( '65f49e5adeb4d9f', '65f496a65bc8011', 'frots', 'input', 'fro_5', '5 (12)', '65f49e5ade8eb9f', '50', '130', '270', '60', '20', '1', 'right', '0', '0', NULL, NULL, NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', 'N|1000.00', 'number', NULL, '', NULL, NULL, '0', '', '', '', '', '', '', '', NULL, NULL ); 
INSERT INTO zzzzsys_object (zzzzsys_object_id, sob_all_zzzzsys_form_id, sob_all_table, sob_all_type, sob_all_id, sob_all_label, sob_all_zzzzsys_tab_id, sob_all_order, sob_all_top, sob_all_left, sob_all_width, sob_all_height, sob_all_cloneable, sob_all_align, sob_all_validate, sob_all_access, sob_all_access_condition, sob_all_event, sob_all_style_type, sob_all_style, sob_calc_formula, sob_calc_format, sob_run_zzzzsys_form_id, sob_run_filter, sob_run_method, sob_run_target, sob_run_type, sob_run_id, sob_display_sql, sob_select_multiple, sob_select_2, sob_select_sql, sob_lookup_code, sob_lookup_description, sob_lookup_description_width, sob_lookup_autocomplete, sob_lookup_zzzzsys_form_id, sob_lookup_javascript, sob_lookup_php, sob_lookup_table, sob_subform_zzzzsys_form_id, sob_subform_foreign_key, sob_subform_add, sob_subform_delete, sob_subform_type, sob_subform_table, sob_input_count, sob_input_format, sob_input_type, sob_input_icon, sob_input_javascript, sob_input_datalist, sob_input_attribute, sob_input_file_target, sob_html_code, sob_html_chart_type, sob_html_javascript, sob_html_title, sob_html_vertical_label, sob_html_horizontal_label, sob_image_zzzzsys_file_id, sob_all_json, sob_json) 
VALUES ( '65f49e5adeb66b2', '65f496a65bc8011', 'frots', 'input', 'fro_soot', 'Соотв', '65f49e5ade8eb9f', '60', '160', '270', '60', '20', '1', 'right', '0', '0', NULL, NULL, NULL, NULL, '', '', '', '', '', NULL, NULL, '', '', '', '0', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0', 'N|1000.00', 'checkbox', NULL, '', NULL, NULL, '0', '', '', '', '', '', '', '', NULL, NULL ); 
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Question about cloning forms

Unread post by kev1n »

The error means that the record already exists. Either you did not tick "create new PKs" in the cloner or that query was already excecuted.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: Question about cloning forms

Unread post by kknm »

Thank you very much for your time - everything worked out!
After optimizing the database, everything worked out - it looks like there was a link to this object somewhere in the cache.
Post Reply