# Linking one artboard to two others, and randomizing which one it lands on

**URL:** <https://forums.creativeclouddeveloper.com/t/linking-one-artboard-to-two-others-and-randomizing-which-one-it-lands-on/623>\
**Category:** UXP Plugin API\
**Tags:** ui\
**Created:** [February 7, 2019, 5:36pm UTC](https://forums.creativeclouddeveloper.com/t/linking-one-artboard-to-two-others-and-randomizing-which-one-it-lands-on/623 "2019-02-07T17:36:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aeb685](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@aeb685](https://forums.creativeclouddeveloper.com/u/aeb685)\
**Post date:** [February 7, 2019, 5:36pm UTC](https://forums.creativeclouddeveloper.com/t/linking-one-artboard-to-two-others-and-randomizing-which-one-it-lands-on/623/1 "2019-02-07T17:36:16Z")

</div>

Hi there,

I am trying to write a script to link one artboard to two others in Adobe XD. I am trying to write a simple script for a plugin that would randomize the next page after a button is selected. For example, if there was a button on page 1 that reads “Flip a coin”, clicking that button would result in a random selection of either page 2 (“Heads!”) or page 3 (“Tails!”). Let me know if anyone knows the best way to access code that would let me randomize this interaction

Thanks,

Annie

---

<div class="post-metadata">

**Author:** ![stevekwak](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/stevekwak/32/48_2.png) [@stevekwak](https://forums.creativeclouddeveloper.com/u/stevekwak)\
**Post date:** [February 7, 2019, 6:23pm UTC](https://forums.creativeclouddeveloper.com/t/linking-one-artboard-to-two-others-and-randomizing-which-one-it-lands-on/623/2 "2019-02-07T18:23:36Z")

</div>

Hi @aeb685 , currently, the only UI entry point available is a modal dialog. You cannot add a click listener to an object on an artboard as you described. Could using a modal dialog work for this use case?
