# Pulling out data from multiple contract

**URL:** <https://forum.canton.network/t/pulling-out-data-from-multiple-contract/2715>\
**Category:** App Development\
**Created:** [June 16, 2021, 2:06pm UTC](https://forum.canton.network/t/pulling-out-data-from-multiple-contract/2715 "2021-06-16T14:06:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Stephen](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/stephen/32/102_2.png) [@Stephen](https://forum.canton.network/u/Stephen)\
**Post date:** [June 16, 2021, 4:53pm UTC](https://forum.canton.network/t/pulling-out-data-from-multiple-contract/2715/2 "2021-06-16T16:53:21Z")

</div>

You can lookup a contract on the ledger if you have [its contract ID](https://docs.daml.com/1.13.1/daml/reference/structure.html#choice-body-structure), or the [contract has a key](https://docs.daml.com/1.13.1/daml/reference/contract-keys.html) and you have that key, _and_ you are a stakeholder in the contract.

However, most workflows that build up a final contract like your `CombineDataSet` are _linear_ and _cumulative_, meaning they carry along the data from each preceding step, and each template has a choice that accepts additional data and takes you to the next step. [The new Daml training videos feature several examples of this.](https://discuss.daml.com/t/sneak-peek-of-new-daml-training-videos-for-daml-forum-members/2600)

If that does not fit your use case, contract IDs may be passed as choice arguments; this is the easiest way for you to get at the contracts you want to combine, but it is worth asking yourself: what do you want to happen to the prior contracts then?

---

_[View the full topic](https://forum.canton.network/t/pulling-out-data-from-multiple-contract/2715)._
