Possible to Capture More than 100 Fields?

The project I'm working on grew in size. Looks like we'll need to capture 200 fields. Is this possible? Really appreciate the help!!

May 14, 2020, 5:13 pm

Click for thumbs down.0Click for thumbs up.0#1

While a single data table will accept a maximum of 100 fields, consider using two data tables in the same project. You can achieve this by switching the stencilusertoken variable. Basically, obtain the user tokens for both tables, then switch them as needed depending on which table you're writing to.

May 14, 2020, 6:45 pm

Click for thumbs down.0Click for thumbs up.0#2

Thanks for getting back to me! Can you elaborate a bit more on "switching the variable?" Maybe provide just a simple example? Thanks so much!!

May 15, 2020, 10:21 am

Click for thumbs down.0Click for thumbs up.0#3

Here's what you can try:

  1. Create two blank text variables, we'll call them token1 and token2.
  2. Initialize the widget with the code from the "How to use..." page.
  3. Write any field value to the table using the CloudSet('field', 'value'); function. At this point, you will have the user token for table 1 in the variable stencilusertoken.
  4. Save user token to token1:
    var player = GetPlayer();
    player.SetVar('token1', player.GetVar('stencilusertoken'));
  5. Switch to table 2 (in the string below replace XXX with strings from the "How to use..." code for table 2):
    var player = GetPlayer();
    player.SetVar('stencilusertoken',player.GetVar('token2'));
    window.baseurl = 'https://cluelabs.com/stencil/display/widget-data-cloud?v=XXX&chart=XXX';
  6. Write any field value to table 2 using the CloudSet('field', 'value'); function. At this point, you will have the user token for table 2 in the variable stencilusertoken.
  7. Save the value of stencilusertoken to variable token2.
    var player = GetPlayer();
    player.SetVar('token2', player.GetVar('stencilusertoken'));
  8. You can continue switching back and forth between the tables by overwriting stencilusertoken and the base URL:
    var player = GetPlayer();
    player.SetVar('stencilusertoken',player.GetVar('tokenX'));
    window.baseurl = 'https://cluelabs.com/stencil/display/widget-data-cloud?v=XXX&chart=XXX';

If you need to keep track of which rows in table 1 correlate with which rows in table 2, consider getting the user id from table 1 with CloudMeta('idthis', 'variable'); and then saving this value as one of the data fields in table 2.

 

May 15, 2020, 10:28 pm

Click for thumbs down.0Click for thumbs up.1#4

You guys are awesome! That works great...really appreciate the help!

May 18, 2020, 10:28 am

Click for thumbs down.0Click for thumbs up.0#5