# Create Two Related Things When Button Is Clicked

**URL:** <https://forum.bubble.io/t/create-two-related-things-when-button-is-clicked/142788>\
**Category:** Questions\
**Created:** [March 24, 2021, 4:45am UTC](https://forum.bubble.io/t/create-two-related-things-when-button-is-clicked/142788 "2021-03-24T04:45:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluesyBlues](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@bluesyBlues](https://forum.bubble.io/u/bluesyBlues)\
**Post date:** [March 24, 2021, 4:45am UTC](https://forum.bubble.io/t/create-two-related-things-when-button-is-clicked/142788/1 "2021-03-24T04:45:51Z")

</div>

Hi:

I am looking for help in creating two things when a button is clicked. The relationship between the first and second thing is Master-\>Detail.

I can create the first thing when the button is clicked - that’s pretty straight forward. But I have no idea how to get the ID back from the first thing in order to add it to the second thing to establish the relationship.

Any help or pointers would be much appreciated!

PS: I tried searching the forum but most results seem to be related to creating bulk items and suggesting the use of the data api.

---

<div class="post-metadata">

**Author:** ![bluesyBlues](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@bluesyBlues](https://forum.bubble.io/u/bluesyBlues)\
**Post date:** [March 24, 2021, 5:16am UTC](https://forum.bubble.io/t/create-two-related-things-when-button-is-clicked/142788/2 "2021-03-24T05:16:08Z")

</div>

Figured out it - use the “result of step x” action.
