# \#20 Lucky Draw App

**URL:** <https://community.glideapps.com/t/20-lucky-draw-app/36105>\
**Category:** Project Showcase\
**Created:** [December 19, 2021, 1:31pm UTC](https://community.glideapps.com/t/20-lucky-draw-app/36105 "2021-12-19T13:31:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Augusto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augusto/32/25004_2.png) [@Augusto](https://community.glideapps.com/u/Augusto)\
**Post date:** [December 19, 2021, 1:31pm UTC](https://community.glideapps.com/t/20-lucky-draw-app/36105/1 "2021-12-19T13:31:22Z")

</div>

Hi guys.  
I’m using this category to show my progress from my new app.  
I hope you guys like it. 😉

---

<div class="post-metadata">

**Author:** ![Augusto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augusto/32/25004_2.png) [@Augusto](https://community.glideapps.com/u/Augusto)\
**Post date:** [December 19, 2021, 1:35pm UTC](https://community.glideapps.com/t/20-lucky-draw-app/36105/2 "2021-12-19T13:35:02Z")

</div>

How it works :

- User select any number from inlist
- Those numbers are added to History tab
- With option in inlist has it own row number.
- With option has a timer. With user has some hours to complete the payment before those selected numbers expire.

---

<div class="post-metadata">

**Author:** ![Augusto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augusto/32/25004_2.png) [@Augusto](https://community.glideapps.com/u/Augusto)\
**Post date:** [December 19, 2021, 1:56pm UTC](https://community.glideapps.com/t/20-lucky-draw-app/36105/3 "2021-12-19T13:56:18Z")

</div>

#1 Inlist with options.  
Here i got into a problem, row numbers.  
When you have google sheets you have a option using **row()** function.

So as a counter-measure I have to find a way to get those numbers automatically.

How I did it?

- Added a ROWID to which row item.
- Added a LOOKUP column, related to which ROWID at that specific glide table.
- Added a ARRAY \> FIND.ELEMENT.INDEX column : here I get numbers starting from zero(0).
- Added a MATH column, here I sum the previous result (index) + 1.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/6/168ebd42973a60b0ccc5d247eb0e8ea6641f4cff.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/8/78b4f8022970790e51337edc379eb1f8d5aced68.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/4/84620d384c84974af0eb6414e02041c1def19105.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/9/09144b11c2e82c1438ea88c73c6fc868cc4953dd.png)

**RESULT :**

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/c/6c8047694a94f877f71b2ee0dd951c8cd6eb9e06.png)

---

<div class="post-metadata">

**Author:** ![Augusto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augusto/32/25004_2.png) [@Augusto](https://community.glideapps.com/u/Augusto)\
**Post date:** [December 19, 2021, 2:09pm UTC](https://community.glideapps.com/t/20-lucky-draw-app/36105/4 "2021-12-19T14:09:38Z")

</div>

#2 Get selected INLINE LIST option to a different glidetab.  
There are some tuturials, but i couldn’t understand much.

How I did it:

- Added a DATE/TIME column: One at NUMBERS table, another at HISTORY table.
- Added a RELATION column in between those glide tables.
- Added a TEXT column: here I used an ACTION to write USER.ID from USERS glide table.
- Used a ACTION to write to HISTORY table using selected option from INLIST LIST.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/5/05e9958c9b81695b5431763f2800f963c1333147.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/3/13df4fb630c88020ef35ef40023127d81f7b628e.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/4/84bbeb3f4e04928cc9c1e6dad6605ab60da5f649.png)

---

<div class="post-metadata">

**Author:** ![Augusto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augusto/32/25004_2.png) [@Augusto](https://community.glideapps.com/u/Augusto)\
**Post date:** [December 19, 2021, 2:22pm UTC](https://community.glideapps.com/t/20-lucky-draw-app/36105/5 "2021-12-19T14:22:15Z")

</div>

#3 SELECTED OPTION FROM INLIST

- After selection, the number is not listed.
- The green button appear.
- Added a RICHTEXT BOX with css at all those tabs: Here I hidden the top, where the user had access to the MENU.

Since I not using a FORM at the button, I built another TAB. Which I occult it at MENU tab.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/b/dbd38e49a51fb8720bcf139a47419a1e15983a8a.png)

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/f/2fdb6f0c8319b246af2f6ae6956579bca104e2b9.png)

```auto
<pre><span><style>

[id="tabBar"]{
display: none;
}

[data-test="glide-app-bar"] :nth-child(1) {
display: none;
}

#app-root div[opacity='1'] {
color: transparent;
}

```

---

<div class="post-metadata">

**Author:** ![Augusto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augusto/32/25004_2.png) [@Augusto](https://community.glideapps.com/u/Augusto)\
**Post date:** [December 19, 2021, 2:37pm UTC](https://community.glideapps.com/t/20-lucky-draw-app/36105/6 "2021-12-19T14:37:02Z")

</div>

#4 SHOPPING CART TAB  
Here is a simple GLIDE tab.

- Added a SWITCH at the top.
- Added some TEXT ENTRY fields, IMAGE PICKER and a HINT at the bottom.

The SWITCH is for the user to see different DATA, I don’t like to be so full of infos at a single screen.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/c/cc4e2b5eeea102a438294eeed0d7c430f9d994ea.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/c/cc253698d24812025940f3380d7b9ad1a30ddf1d.png)

The other DATA using the SWITCH was a boolean to show…

1. Count of how many numbers were selected.
2. Which numbers the user selected.
3. Price by number.
4. How much your purchase was.

- Added two buutons:

1. ACTION, CLIPBOARD to copy the PIX key.
2. FLOATING button to GO BACK to the previous screen.

- Also a HINT, so the user can know how things work.

---

<div class="post-metadata">

**Author:** ![Augusto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/augusto/32/25004_2.png) [@Augusto](https://community.glideapps.com/u/Augusto)\
**Post date:** [December 21, 2021, 11:26pm UTC](https://community.glideapps.com/t/20-lucky-draw-app/36105/8 "2021-12-21T23:26:48Z")

</div>

Hello @firozkhanuk1214, I will post it soon.  
I have being modifying it, so for now its not in working order.
