Help with creating an expression that searches tag values

I am trying to create a view that records flightbar information based on its location. Each of my tags for flightbars have a location parameter and I would like to create a view that when that location parameter matches the tank location then it will pull the remaining information from that flightbar tag, such as part, order, etc to display on the tank view. However, I have not had much luck figuring out a good process to go about it, whether to create a named query, indirect tag binding or a script that will search all the location parameters from the flightbar tags until it finds a match. Any guidance or a link to a previous problem that is similar to mine would be appreciated.
Below is the tag list for flightbars as well as the parameters that are listed under each


Feel like you just need an indirect tag binding

It may help to know the technology that you are working with (Vision, Perspective, etc.). If possible, tagging the post with the appropriate versions / modules will benefit others as well.

Sounds like you need my integration toolkit's tags() function to pull in all of the flightbar locations, then my where() function to pick out the matching location.

2 Likes

Hello, I was leaning more towards using an indirect binding. My hangup that I am finding is creating a reference to that flightbar based on a custom parameter that I added to my view (view.params.Location1) where Location 1 is that Location on the tank that i want it to match with a location value in the flightbar tags. So i guess i am having trouble thinking of an expression that may do that.

My apologies. I am using Perspective.

If you are not regularly adding/removing Flightbars, consider:

  • Create an expression structure binding as an array of locations. This binding would contain an array of all current values of all Flightbar locations. Something resembling:
0: "Not Used"
1: {[NJ_Ludy]Ludy/Tags/Flightbar/Flightbar1/Location}
2: {[NJ_Ludy]Ludy/Tags/Flightbar/Flightbar2/Location}
3: ...
  • Create another parameter which uses the indexOf() expression function to extract the index from the value which matches your desired location.
  • Use the index from the previous step in your indirect bindings.
  • Optionally, create a single folderPath property, containing the resultant value "[prov]path/to/Flightbar#", as a string, which all other (indirect) bindings in your view could reference.

Thank you, that seemed to work for what i needed for!

1 Like