Update Entity step for a piece of data in DB?
Comments
-
I am working with the Update Entity step to update one piece of data in an entry on the database that was fetched earlier in the flow and returns many properties; I would like to change one and send the update back to the database.
-
[color=rgb(34, 34, 34)]I have made a couple example flows that I think will work well for you in regards to updating an entity. [/color]
[color=rgb(34, 34, 34)]
[/color]
[color=rgb(34, 34, 34)][b][u]For Multiple Entity Updates:[/u][/b][/color]
[color=rgb(34, 34, 34)]
[/color]
[color=rgb(34, 34, 34)]
[img]https://mail.google.com/mail/u/0?ui=2&ik=6efa076f06&attid=0.1&permmsgid=msg-a:r7564189238531761852&th=16b7182634a61e03&view=fimg&sz=s0-l75-ft&attbid=ANGjdJ8II8sN1vzojP_T7x3aRQ63Lgi3W0PoLWcH-a4uECbl6WIiDEPo1wsPsMFqGnUFh0JkZCW9ZXaY3eaTETfezIgJCtEfZscdR5j6C5Cr4QBPJGKvlKvQ5sgIcYs&disp=emb&realattid=ii_jx3o736x0[/img]In this first flow, we are using a [b]Fetch Entities[/b] step to fetch from the Accounts datatype within Decisions. The [b]ForEach[/b] step is going to take each of the accounts Ive fetched and shoot them over to the next step, which would be the [b]Create Data[/b] step. The [b]Create Data[/b] step is going to find the [i]Company[/i] portion of each account and change the value to a constant that Ive set called "Decisions" as shown below.
After my [b]Create Data[/b] step makes the changes to [i]Company[/i], its going to throw those accounts back over to the [b]ForEach[/b] step and loop them around until all of the accounts are updated. Once the accounts of been tossed around those two steps for a while, [b]ForEach[/b] will finally finish looping and its [i]done[/i] path will take us over to a [b]Save Entities[/b] step. This step is going to save those changes that weve made to the Entity Results output of the [b]Fetch Entities [/b]step thus completing the workflow and Entity updates. Note that this method will work for single entity update as well, as long as a list is being passed into the [b]ForEach [/b]step, but it can be a list of one.
[b][u]For Single Entity Updates:[/u][/b]
[b][u]
[/u][/b]
[img]https://mail.google.com/mail/u/0?ui=2&ik=6efa076f06&attid=0.3&permmsgid=msg-a:r7564189238531761852&th=16b7182634a61e03&view=fimg&sz=s0-l75-ft&attbid=ANGjdJ-UsI8jPATE_ubRw9IsuGrRvPj9QZgzup_ewlaTGh9O3oSZOzOenVj4KlsK9jnj-zXqDN5yN_dso1BA8Ubrr7rrmRLVD4Q0QRHXo4FEfxO18Uzau_umanucY_Y&disp=emb&realattid=ii_jx3os16l3[/img]In this flow, we are starting off with the [b]Fetch Entities [/b]step again to grab those Accounts for us again. We then get taken to a [b]Create Data[/b] step that is going to specify which account we want to change by mapping its data definitions to [i]Account To Change[/i] of the Accounts datatype.
The second [b]Create Data[/b] step is going to be for us to modify the Data Definitions in order to make our changes in a similar fashion to how it was configured in the post above. So once the account has been specified and the changes have been made, it then goes to the [b]Save Entities [/b]step where in this case the single entity is saved back to the entity results.
Please let me know if there is any additional information I can provide in this regard! Thank you!
[/color]
Howdy, Stranger!
Categories
- 4.1K All Categories
- 61 General
- 11 Training
- 201 Installation / Setup
- 1.1K Flows
- 106 Rules
- 260 Administration
- 212 Portal
- 489 General Q & A
- 693 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 51 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 178 Pages
- 5 Process Mining
- New Features
- 178 Datastructures
- 69 Repository
- 219 Integrations
- 28 Multi-Tenant
- 27 SDK
- 76 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 66 Lunch And Learn Questions