Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to pass a variable into a field moniker
#1
I am trying to streamline my system and re-use code where I can. So, I am want to use the Global actions more and to do that I need to pass either a variable or Action Parameter from either a button on the IV or a remote control to the Global Action. This variable will be the room name so the Global action can act according to the room name.

I have variables driver set for each room - Variables_AV.VideoSource_xxx
xxx = Room names

I can pass the value I want but I cannot get it into the field moniker in the Global Action

If System Equals($(Variables_AV.VideoSource_%(LVar:CQCActParm_1)))

would convert to after passing the variable from the button:

If System Equals($(Variables_AV.VideoSource_Office))

I recall doing this a long time ago but cannot find my notes or through a site search.
System: WHS, UPB, Plex, Elk
Drivers: Autopatch, DataLog DB, DTV IP, GC-100, IRA, Logic Server, Variable Driver, Weather Underground
Reply
#2
Deleted. Not a helpful response.
Reply
#3
You can't have nested tokens. You either have to concatenate them into a single local variable first. Or, in your case, use a field read call instead of doing it with a token, so:

Devices::ReadField(Variables_AV.VideoSource_%(LVar:CQCActParm_1), LVar:ToFill, False);

Something like that. That way you don't have to use a nested token to do it.
Dean Roddey
Explorans limites defectum
Reply
#4
Worked perfectly. Called the Global action from the button/IV, sent the Action param to the Global action and used the FieldRead.

Thanks
System: WHS, UPB, Plex, Elk
Drivers: Autopatch, DataLog DB, DTV IP, GC-100, IRA, Logic Server, Variable Driver, Weather Underground
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error writing value to field Spot 6 1,147 05-28-2021, 03:22 PM
Last Post: Spot
  Timed Field Change in Lutron HW8 avtexan 11 5,942 08-06-2018, 11:17 AM
Last Post: Dean Roddey
  ELK V2 Driver - AreaArm field & Triggers? sic0048 4 4,072 08-19-2017, 04:46 PM
Last Post: Dean Roddey
  EventGhost alternatives to getting driver/field *TO* SmartPhone? IVB 37 15,480 08-13-2016, 07:32 PM
Last Post: IVB
  Field Incr/Decr Button Widget khill 15 7,788 05-17-2015, 01:04 PM
Last Post: dlmorgan999
  Renderer field in Media Info (Auto-Gen) Andre 2 2,889 02-19-2015, 07:00 PM
Last Post: rtarver
  Variable Times for Triggered Events TurboSam 9 5,523 11-19-2013, 10:00 PM
Last Post: Dean Roddey
  Include Variable in button text? rtarver 3 2,276 09-24-2012, 05:34 PM
Last Post: Dean Roddey
  ISY99 - Changing an Enumerated Field in a Scheduled Event kblagron 2 2,210 09-20-2012, 09:49 PM
Last Post: kblagron
  Syntax for variable action khill 8 3,715 03-23-2011, 08:26 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)