Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Static List Browser and Parameters

I'm trying to make a reusable list for variable driver stringlist types.

I want to pass in the address to the list.

Here is an example of what I'm passing on invoke popup:

"$(SystemState.IrrigationPrecipHistory)","Precip History"

On the popup template under preload I have:


LVar:CQCActParm_2 is the title

So far it's not working. Is this even possible? See anything I'm doing wrong?
Each of those lists should be a quoted comma list, separated by a newline though they themselves shouldn't be quoted. So something like:

"Title 1", "Title 2", "Title 3"\n"Value 1", "Value 2", "Value 3"

And the new line has to be an actual new line, whereas I just used \n to represent one in the text above.

When you set it, do this:

Data::SetDblBrowserList(%(LVar:CQCActParm_1, "^1"))

The "^1" formatting string prevents the expanded value of the variable from being processed any further, which would mess with the new line.
Dean Roddey
Explorans limites defectum
Still having trouble with this. Let me back up a little.

The stringlist fields that I have are mostly quoted lists with a date and data. The macro just adds the object to a string array and then writes the array to the variable driver stringlist field.

"1/1/2001",".01","1/2/2001",".02","1/3/2001",".03" etc

You lost me when you started talking about newlines etc. Is that something I must do in order to make what I was doing work?

The reason I question it is because before I got the idea to make the template reusable whereby I pass the variable driver stringlist field into the template, I had a different template for each different data set that I was wanting displayed. I, therefore, just preloaded into the template the stringlist field and that was working. Like this:


It's only when I attempt to pass it as a parameter into the "reusable" template that I'm getting errors. Clear as mud?
These double lists are two quoted comma lists separated by a new line. The gotcha is that, if the value is processed in the usual way that an action command is processed, that will trash the new line. Any time you reference a variable that holds these types of lists, use the format I mentioned above, i.e.:

%(GVar:MyDblList, L"^1")

That will prevent the expanded value from being processed any further. Use this when you dereference the variable.

I'm not sure why your previous scheme worked, though you were getting it from a field and not as a variable. But still, generally the field value would have been expanded then another pass made to do any further processing that might have become available now on that expanded field value. The same happens with variables. If you do, in any action command parameter:


then the value is expanded out, and then another pass is made to see if there's any further processing to be done. Generally this whacks the newline.
Dean Roddey
Explorans limites defectum

isn't making a difference.

I even simplified my data set down to one pair "1/1/2016", ".01" to test and it's not working.
That definitely wouldn't work if you calling the command to set a double list. That takes two quoted comma lists, separated by a new line. Your example above is a single quoted comma list. If you just want to load a single list, there's another command for that.

Double lists are for when you want to have one list for the visible text, and another list that provides a behind the scenes value for each of the visible text values. So it's two lists of the same size, separated by a new line.

The single line one is something like SetBrowserList(). There's another, SetBrowserList2() that sets the visible/behind the scenes values as two separate lists. SetDblBrowserList is mostly for when getting a list from a driver that has to pass it as one chunk of text, but needs to provide two lists.
Dean Roddey
Explorans limites defectum
Ok. I'm trying that.

In the invoke popup call, is this correct for the parameters?

"$(SystemState.IrrigationPrecipHistory)", "Precip History"

Specifically, do I need to quote: $(SystemState.IrrigationPrecipHistory)?
What are you trying to do here? Do you want to put both those things into the list such that they are visible? or do you want one visible and the other not? And what's the content of that field? Does the field itself contain a quoted comma list? If so, and you just want to see those values, then don't pass anything but that, i.e:

MyBrowser::SetBrowserList($(SystemState.IrrigationPrecipHistory, "^1"))

allowing for errors because I'm typing this from memory. If it contains a quoted comma list, that would set the values in that list you get from the field as the entries in the list browser.
Dean Roddey
Explorans limites defectum
The second parameter is just the title of the template. This is in the preload of the template.



Here is the call to the invoke template:

P2=$(SystemState.IrrigationPrecipHistory) "Precip History"
P3=-1 -1
Have you used the action trace to see what you are actually getting, when you run this template? That will help you figure out a lot of issues. Is anything actually showing up in the command to set the browser list?
Dean Roddey
Explorans limites defectum

Possibly Related Threads…
Thread Author Replies Views Last Post
  Escaping Character in Action Parameters gReatAutomation 0 624 09-02-2020, 05:51 AM
Last Post: gReatAutomation
  HTTP Trigger and Parameters znelbok 1 1,006 06-11-2020, 03:41 PM
Last Post: Dean Roddey
  Possible Bug in Web Browser Widget or SetURL kblagron 8 2,442 04-29-2020, 06:58 PM
Last Post: kblagron
  I cant enter parameters for sizing into the webcam widget. I get errors about invalid ghurty 2 1,241 04-29-2020, 04:01 PM
Last Post: Dean Roddey
  With webriva, anyway to get an embedded browser window? ghurty 1 904 04-26-2020, 04:43 PM
Last Post: Dean Roddey
  Underline of Static Text kblagron 1 1,060 03-04-2020, 01:01 PM
Last Post: Dean Roddey
  Z-Wave Device List simplextech 2 1,392 02-01-2020, 07:24 AM
Last Post: simplextech
  Widget: Web Browser simplextech 4 2,130 01-12-2020, 12:47 PM
Last Post: simplextech
  Image Browser? gReatAutomation 8 2,755 06-26-2019, 06:12 PM
Last Post: gReatAutomation
  Deleting Drivers From AI "Add Drivers List" kblagron 1 1,051 05-16-2019, 09:18 AM
Last Post: Dean Roddey

Forum Jump:

Users browsing this thread: 1 Guest(s)