Edit WITH

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
john
Posts: 113
Joined: Tue Jul 25, 2006 10:48 am
Location: UK

Edit WITH

Post by john »

Hi

Is it possible to edit records by picking values from other business objects? I have successfully achieved this when I enter a NEW record but not when editing. My code when creating a new record would look something like the following:

ENTER NEW Change WITH Change.Name=Temp.Name USING Form

I have a situation where I would like to be able to create a change of details form form a temp worker. This form will need to be kept seperate from the original temp record but when created the values are populated by the original temp values (to make it easier to fill in by the user). The necessary changes are made and the object created. I am after some way of then tipping this information back into the original temp record once it has been passed by somebody else.

I have tried using several different methods but nothing seems to work?

I hope this all makes sense, I suppose my question is, is this do-able?

Best Regards
John
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

John,

Could you provide more details on the scenario you are trying to implement. Preferably a step-by-step description of what objects are created, when they are approved and what data should be copied back.
Aware IM Support Team
john
Posts: 113
Joined: Tue Jul 25, 2006 10:48 am
Location: UK

Post by john »

Hi

Thanks for the quick response. I will try to explain....

I have a business object called Temp, which as the name suggests stores all information form Temporary workers. These temps are submitted by users at our Agencies. Once we receive this information we check it (in another Visual perspective) and import it into our payroll system. Once this happens it becomes "LIVE" (we change an attribute to true!), so these temps then populate a live list for the Agencies. All of the attributes on the Temps are read only to both the Agency and the Payroll Assistant once they have been filled in. This is the type of Temp that is entered governs who fills in a particular attribute (the Agency or The Payroll Assistant). This is achieved with the OLD_VALUE prefix eg:

If OLD_VALUE(Temp.Name)<>'' Then PROTECT Temp.Name FROM ALL EXCEPT Administrator

This all works great apart from a bit of testing and the odd bug that may need to be fixed!

Now an agency will also need to submit a Change of Details form. As the Name suggests it is to Change the details of a temp. As all attributes are read only anyway they could bot affect changes to the original temp record. Apart from this we need there to be an audit trail to show that we actually received a change of detail form so this form must be a seperate business object. I have called this "COD" (bit of a daft name but never mind!!!). This is basically a copy of the Temp BO with an extra field to uniquely identify the instance of any COD.

When a new COD is entered, I start this with a process that along with other things picks up all of the fields from a particular temp record and drops them into the COD form (this was more for ease of entry). All the agency then does is changes all of the fields that need to be changed and pretty much the same rules apply to the COD that would of applied to the original temp to check the information is valid. Once this has been done a new COD is created. This is then imported into our payroll system again, overwriting the existing record in that system. This is done by the Payroll Assistant. Now all is up to date apart from the original Temp record that the Agency sees.

I would like to be able to Edit the original Temp record automatically so that the attributes in the COD (for a given Temp ID) automatically overwrite the exitsing record so there is no human intervention with regards to typing during this process....

I am very sorry for the length of this post but I dont know how else to describe it.

Regards
John
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

> I would like to be able to Edit the original Temp record automatically so that the attributes in the COD (for a given Temp ID) automatically overwrite the exitsing record so there is no human intervention with regards to typing during this process....

You can do it with a process like this (takes COD as input):

FIND Temp WHERE Temp.TempID = COD.TempID
Temp.FirstName = COD.FirstName
Temp.LastName = COD.LastName
Temp.Occupation = COD.Occupation
...
Aware IM Support Team
john
Posts: 113
Joined: Tue Jul 25, 2006 10:48 am
Location: UK

Post by john »

Hmmmm

Thanks for that, I had the feeling I had already tried it but I will give that a go and see what happens. Perhaps my code wasn't exactly the same

Best Regards
John
Post Reply