Buy Now
Sign in

copy a model to reuse without rewrite it again

gix.vax , March 07 2020, 16:52
G
gix.vax 119
March 07 2020, 16:52 #391561
 Answer
hi all
i have a very complex function to read data (4 tables and a bunch of filter) that populate a pdf, now i need to use it in a csv download function
if in CSV i use my read data it works but it show too much columns
is there a way to say wich columns should be in csv ?
or
is there a way to copy my read_data model so i can take off fields i don't want to show without rewrite entire function ?
i see in database under #_chronoengine_connections6
the field "functions" is populated with all the functions of the CC6 form and have an id in the array:
is a problem if i copy the function i need putting it at the end changing name and giving an id = maxid+1
(id have holes so i think it assign a number and if you delete something and add a function it give a id+1 number to it)
?
EDIT:
i try to edit function field :
i copy the read part i need inside field, paste at the end of the field before the ending curly bracket, with a new id, and a changed name for read data
and it works