Why lists are not updating with scene1 and why duplicated with button?

I am trying to extract data from two Spreadsheets using single web component. The designer and block will give the idea of application.

Objective: During initialization(Scene1) of the app, the program should load two different values in two list components.
Conclusion: I tried with different combinations but i could not reach the objective and end up with two issues
Issue 1: Why the list values are not loading during scene 1 initialization

  1. After Clicking view button, the two list components showing with the same values. why not different

Please suggest some solution.

You are making two calls with the web component at the same time, and not handling the responses correctly, therefore most likely you only get the last response returned to your lists.

Work on the logic. Call the first google sheet data, get and handle the return, then call the second google sheet data, and handle that return. Use a variable to help you identify which call you are making when handling the responses in Web1.GotText.

Thank you! I know that we can fetch the data from two sheets by using Web1 & Web2. Is it not Possible to use one Web component to fetch values from different sheets.ie. Using call web1.get and Web1.Gottext.

I need to fetch the data from 10 google sheets and store them in global variables which will be used in program. I need to avoid duplication.

Please suggest

Give me a moment or two, I will show you an example

There are many ways to approach this, here is one.

  1. Make a lists of lists (sheetIDs) of variable identifiers and sheet IDs
  2. Make a variable (SSID) to hold the applied variable identifier from sheetIDs
  3. Create a procedure that sets up the Web1.Url which contains the SheetID (using a lookup)
  4. A button event calls the first sheet
  5. Everything else happens from the Web1.Text event block, calling the next sheet, once data is returned and assigned to a data(x) variable.

This should give you the general idea. Of course, if some sheets require different parameters, then just create a different procedure to call. For a known number of sheets, the contents of Web1.Text can be hard coded - as in this example. With a bit of thought, this can be programmed with procedures to make it more dynamic.

Thank you so much. I have gone through every bit of it and understood properly. The over all idea is invoke all the call web1.get within in one web1.Gottext trigger except first call.

Let me try your approach with small modification, where in it fetches the sheet pairs in the first call and dot the rest.

Thank you once again

oops I forgot to add this block before the responseContent

image

Dear TIMA12!
You suggested right approach.This is my block and result. Thank you.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.