Hi everyone, i have developed an app for filing leave and travel order, but i manually update names whenever new employee comes. this time i would like to get the list from my employee database. can someone guide me in building a block of listpicker and calling data from GSheet? thanks
- Structure Google Sheet: make sure Google Sheet has a clear structure
- Column A: Names
- Column B: IDs
- Column C: Department
- Publish Google Sheet:
- Google Sheet, click on File > Publish to the web.
- Choose the sheet you want to publish & select CSV as the format.
- Copy the generated link, this will be used to fetch data into your app
- Set Up the Web Component in App Inventor:
- Drag & drop a Web component into your app.
- Set the Url property of the Web component to the CSV link you obtained from your Google Sheet.
- Fetch & Parse Data:
- Use the Web.Get method to fetch data from the Google Sheet.
- In the Web.GotText event, utilize the list from csv table block to convert the CSV text into a list.
- Extract the desired column (e.g., names) & set it as the Elements of your ListPicker.
- Handle Selection:
- In the ListPicker.AfterPicking event, use the selected index to retrieve related information (like ID or Department) from the list & display or process it as needed.
thank you so much sir ! will try this.
sorry sir but im lost in fetchh & parse data. can you please guide me more
thanks sir
sir, if i have multiple tabs on my GSheet, how can i specify certain tab?
Change the sheet name or gid
No need to "publish" the google sheet, just set it to anyone with the link and use the following:
1 Like