New object based on existing object

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
suhage
Posts: 6
Joined: Tue Mar 07, 2023 11:46 pm

New object based on existing object

Post by suhage »

I'm trying to make a new object (really actually a new row in my query results) using an existing object (read: row) as a template, and this is proving notoriously difficult. Does anyone have any tips for how to achieve this? Is it even possible?
Thanks in advance!
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: New object based on existing object

Post by joben »

You could use the duplicate function:
https://www.awareim.com/dokuwiki/doku.p ... /duplicate

If you don't want to save the row automatically, you could instead ignore the DUPLICATE function and make a process that can be executed on each row (operations with records) like:

ENTER NEW BO WITH
BO.Name=Bo.Name, Bo.Location=Bo.Location, BO.Description=Bo.Description USING Main

That will use the current row data as input and will populate each field for you inside the form, and you can edit it as you like before saving it.
Regards, Joakim

Image
suhage
Posts: 6
Joined: Tue Mar 07, 2023 11:46 pm

Re: New object based on existing object

Post by suhage »

joben wrote: Fri Mar 31, 2023 9:14 am You could use the duplicate function:
https://www.awareim.com/dokuwiki/doku.p ... /duplicate

If you don't want to save the row automatically, you could instead ignore the DUPLICATE function and make a process that can be executed on each row (operations with records) like:

ENTER NEW BO WITH
BO.Name=Bo.Name, Bo.Location=Bo.Location, BO.Description=Bo.Description USING Main

That will use the current row data as input and will populate each field for you inside the form, and you can edit it as you like before saving it.
This sounds like just what i need! i will try it out, thank you!
suhage
Posts: 6
Joined: Tue Mar 07, 2023 11:46 pm

Re: New object based on existing object

Post by suhage »

Update: I made a process like suggested above and it works like a charm!
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: New object based on existing object

Post by joben »

Thanks for reporting back. I'm glad it worked!
Regards, Joakim

Image
Post Reply