Update selected table fields

Update selected table fields

  
Hi All,

Is there a way to use the UpdateTable action to update a selected number table fields? I've tried using the Record and Record.List types mapped to the fields I want to update. The update works for the fields I added in the assign properties list but the fields that were not assigned were overwritten with a null value. I have my update action in the same flow just after the create action.

Thanks in advance!

Bruce.

Hello Bruce,

Only the fields that you put one the assign are updated, the others remains with previous values.
On the update for the record you only choose the Create Id and the values that you want to update.

I hope that helps

Regards
Hugo Pinheiro
Hi Hugo,

I have tried both Record and Record List type and it still seems to overwrite the record.  I've attached the test application if you have time to have a look. On the save action on TableOneEdit, I create a new record in TableOne and also push TableOne info to TableTwo, this all works fine. Then what I'm trying to do is query TableTwo and update the TableOne.TableTwoFieldOne and this works, but FieldOne gets set to NULL on the update.

You can test it by creating a record in TableOne with a value in FieldOne only,  then have a look at the record.

Thanks,
Bruce.
Hello Bruce,



Regards,
Hugo Pinheiro
Hi Hugo ,

Thanks for the reply! I've updated the Assign list to include the ID but the same thing is happening.

Thanks,
Bruce.
Hello Bruce,

First of all, why you do a query to get the TableTwoInfo? If you already have it from the edit record you can use it again.

Check my oml.

Regards
Hugo Pinheiro
Hi Hugo,

Thanks again for the response, your example works without the query. The reason I was using a query to get table two data is because I thought I needed to.  Question, will the CreateOrUpdateTableTwo return all fields from table two? What if a process was updating table two on creation and I needed to get that new field value, a value that was not created from table one?  That's what I was trying to simulate.

Thanks,
Bruce.
Hello Bruce,

So about your first question the CreateOrUpdateTableTwo action will get all the fields if is an update, so you only see changes for the fields that you put on the record that you assign to the action.

If I understood, you are saying that your goal is to update the table two with a  value that will be created on table one. So you do the creation of the table one, after this you need to have a record (your TableTwoRecord for example) , now assign the values for this record on an assign after this you simple use the CreateOrUpdateTable action. Is what you are doing right now on the Save for the TableOne_Edit screen.

I hope that helps

Regards,
Hugo Pinheiro
Hi Hugo,

Thanks for your help! As I mentioned I'm new to development in the agilenetwork and still trying to understand the flow.  I hope the sample app doesn't get to confusing. I've added some flow to create a process in TableTwo that creates a value in FieldTwo on record creation.

So, to recap, when a record from TableOne is created from the edit screen the save action also pushes data and creates a new record in TableTwo, this all works fine.

What I need to do now is get the value created from the process on TableTwo.FieldTwo back to TableOne.FieldTwo all within the same Save action on the TableOne Edit screen.

Thanks again! This is helping me get an idea of how the flow can be used on Save action.

see attached..

Bruce.

Hello Bruce,

For this example you need a query to get the Table One Values, on the assign just only change the TableTwoFieldOne and after do an update to the table one.

Check the attached oml

I hope that now you understand :)

Regards
Hugo Pinheiro
Hi Hugo,

I think I'm good now... thanks again for your help!

Bruce.