# Saving a bookingID from a website so I can reuse it in another section

**URL:** <https://forum.katalon.com/t/saving-a-bookingid-from-a-website-so-i-can-reuse-it-in-another-section/87645>\
**Category:** Web Testing\
**Tags:** web-testing\
**Created:** [April 27, 2023, 11:05am UTC](https://forum.katalon.com/t/saving-a-bookingid-from-a-website-so-i-can-reuse-it-in-another-section/87645 "2023-04-27T11:05:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lisa.s](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/lisa.s/32/20464_2.png) [@lisa.s](https://forum.katalon.com/u/lisa.s)\
**Post date:** [April 27, 2023, 11:05am UTC](https://forum.katalon.com/t/saving-a-bookingid-from-a-website-so-i-can-reuse-it-in-another-section/87645/1 "2023-04-27T11:05:43Z")

</div>

Hi  
when my test is finished, it generates a confirmation page, which generates a BookingID and I would like to capture that ID to use in another test. Ive been exploring with excel, but as its going to change everytime, and I only need it for this one test I wondered if there was a better way I could store it and then reuse it.

![image](https://europe1.discourse-cdn.com/katalon/original/3X/5/3/536ffe4ce1748f9c75311ebe6188d0a33f45663b.png) this is the booking ID that I need so I can then put it in here.

![image](https://europe1.discourse-cdn.com/katalon/original/3X/f/0/f0452b54c9fdfcd19a249d18b9510b7864000e01.png)

I think Ive looked at too many different scenarios/help as Ive got myself so confused as to the best way to do it.

Happy to provide any further code you need, but I didnt think it would be helpful putting my test case here as my Test case is fine, I just need to take this number from it at the end.

---

<div class="post-metadata">

**Author:** ![Elly\_Tran](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/elly_tran/32/21874_2.png) [@Elly\_Tran](https://forum.katalon.com/u/Elly_Tran)\
**Post date:** [April 28, 2023, 3:19am UTC](https://forum.katalon.com/t/saving-a-bookingid-from-a-website-so-i-can-reuse-it-in-another-section/87645/2 "2023-04-28T03:19:43Z")

</div>

Any suggestion to help @lisa.s to improve her saving logic and coding …

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [April 28, 2023, 5:53pm UTC](https://forum.katalon.com/t/saving-a-bookingid-from-a-website-so-i-can-reuse-it-in-another-section/87645/3 "2023-04-28T17:53:01Z")

</div>

The issue is @lisa.s is looking for **the best** , which to me is relative. Anyway, the below is a way that will work but being **the best** is for you to decide. Are you able to handle the Script tab or are you limited to the Manual tab?

> [@Katalon writing data to excel](http://forum.katalon.com/t/katalon-writing-data-to-excel/61587/2):
>
> I explained how you can do this in your other question on this topic. Start there. However, you need to move off the Manual tab onto the Script tab or you can “translate” what I put down from that question into the Manual tab. If this doesn’t fulfill your need, then we can give more information. Edit: To make it even easier, I brought what I wrote there over to this question: 
> 
> > **Maybe like this:**
> >
> > I need to read a client name between Test Suites, so I save the name from one Test Case of Suite 1 i…

If you are only going to get the **bookingID** once for all time, maybe just type it into a spreadsheet yourself manually.

Edit: if you are limited to just the Manual tab, then create a new Test Case and copy and paste the code from the **link** into the Script tab of the new Test Case. After that, look at the Manual tab and duplicate it into your TC.

---

<div class="post-metadata">

**Author:** ![daniel.makra](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/daniel.makra/32/18397_2.png) [@daniel.makra](https://forum.katalon.com/u/daniel.makra)\
**Post date:** [April 30, 2023, 8:24am UTC](https://forum.katalon.com/t/saving-a-bookingid-from-a-website-so-i-can-reuse-it-in-another-section/87645/4 "2023-04-30T08:24:28Z")

</div>

> [@lisa.s](#):
>
> I would like to capture that ID to use in another test.

Do you run your tests from a test suite? One after another?  
You can store the bookingid in a globalvariable and it’s value is preserved until the TS runs.  
It means you can save the id in the first test case and use it in the second one.  
This way the id is not phisically saved in a file

---

<div class="post-metadata">

**Author:** ![lisa.s](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/lisa.s/32/20464_2.png) [@lisa.s](https://forum.katalon.com/u/lisa.s)\
**Post date:** [May 2, 2023, 7:40am UTC](https://forum.katalon.com/t/saving-a-bookingid-from-a-website-so-i-can-reuse-it-in-another-section/87645/5 "2023-05-02T07:40:06Z")

</div>

Thanks for your help 🙂 . I will only be using the Booking ID once. So putting it into a spreadsheet wont quite work for me, hence wondering how to save it elsewhere.

---

<div class="post-metadata">

**Author:** ![lisa.s](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/lisa.s/32/20464_2.png) [@lisa.s](https://forum.katalon.com/u/lisa.s)\
**Post date:** [May 2, 2023, 8:03am UTC](https://forum.katalon.com/t/saving-a-bookingid-from-a-website-so-i-can-reuse-it-in-another-section/87645/6 "2023-05-02T08:03:16Z")

</div>

Thanks, I might give this one a go 🙂
