Today In this Tutorial I will show you how to Store Data in Google Sheet Data from Spinner.
First Step
-
First Of All, Open Google Sheet.
-
Then Create a New Spreadsheet, by clicking on this button.
-
Then, Give a name to Spreadsheet, by clicking on upper left side button.
-
Then, Click on a Tool tab and then click on Create a Form.
Second Step
-
This type of page will be appear in your screen.
I am using Mobile, May be there was a some difference. -
I used 3 Spinner in My App. Company, Category & Model.
So, Now we make 3 Spinner in Google Sheet also. -
Change Name Untitled Question to ‘Company’.
Like this.
-
After Changing the Name of Untitled Question to ‘Company’. You can see this type of option.
-
We are using Spinner. So, we will Choose Drop-down Option.
-
After Choosing Drop-down, we will click on Option 1 and Change Name to Item(Name the item you want to put in the spinner).
Add Item in Company One by One, Like Above
I added 3 Items You Can Add as much as you need.
If this Category was required for users. Then, checked it to Required Else Not.
-
Now we Completed One Category(Company).
Like this we we will make rest of Categories and Add items. -
To make New Category we will click on this button.
You can find this button at the left side of Screen. -
After Making All Categories and Adding Items. We will click on More Option(3 dot) & Click on details Get pre-filled link Button.
Third Step
-
When we click on Get pre-filled link. It show like this.
-
Then Choose Any Item From this(For test).
-
Then Click on ‘Get link’ Button, & Copy that link.
& Paste it in Notepad Or Any safe Place.
-
Then, Copy current Url also & Paste this link also in Notepad Or Any safe Place.
-
Your both link will be like this.
-
Now we will come in Google Sheet. It will be like this.
-
Now, Our work was Completed in Google Sheet. Now, We will go in Kodular.
Fourth Step
-
In Kodular I have Screen Like this.
And we will Add Button Also. -
Now we will Add items in Categories(Spinner) as same as we added in Google Sheet.
-
Then we drag web component and drop on screen. Now, Our work was completed in Design(Layout) Section. So, Now we will go in Blocks Section.
-
So, Now start with blocks.
When Button1 Click, If Spinner1 Selection is not equal to empty or Spinner2 Selection is not equal to empty and so on.
Then, Set Web1 Url to join(use join block).
In,
1st String we will add copied Url, we had copied 2 url. So, First we take this Url https://docs.google.com/forms/d/1fBycwoQfY5rjQPLhV9CqCE18mhZCieHbXuu2nEHK8FI/prefill
Which ends with prefill. So we erase prefill and write ‘formResponse’
So, Now our url will be like this.
Guide For Kodular Community
Now, Copy this Url and paste in 1st string
Please don’t do any type of mistake in Url otherwise it not work.
Now, we take second Url.
Guide For Kodular Community
From this Url We have to search entry. We used 3 Spinner in Our App. So, in Url there was 3 entry.
So, first we copy first entry with number and =. Like this. entry.958363812= and Paste this Url in 2nd String but we add ? at first. So, our 2nd String will be like this. ?entry.958363812=
In 3rd String We take Spinner 1 Selection.
In 4th String We take 2nd entry from above Url. But in second entry at first we add &. So, it will be like this. &entry.492904808=
In 5th String We take spinner 2 Selection.
In 6th String We take 3rd entry from above Url. But in third entry at first we add &. So, it will be like this. &entry.916812303=
In 7th String we take Spinner 3 Selection.
Please don’t use my URL.
- Now, we Completed If, then but you want to show alert or anything, You should use else.
& If you want to show the data was stored or not. So, see Fifth Step.
Fifth Step
- If you want to show the data was stored in Google Sheet or Not.
- Use Web1 Got text block.
- If, Global Response code = 200. Then, Show Alert, Notice, Data was registered. Else Data was not registered.
Like this.