I am in the process of making my project UDT (Had the project working correctly and now I am just setting it up for multiple machines) and having the whole project work dynamically based on the machine number that is running.
I have an expression binding on a few things on my project, and can't seem to figure out how to make it work dynamically.
What I mean by this, is have it look at a tag path for a specific machine Number.
Here you can see that I have a Property Change script that will write to a tag based on the machine running the program:
Edited: You can make custom properties that have dynamic indirect tag bindings for the tag values you are interested in, and refer to those custom properties in the expression. This is the best approach because the tag bindings will stay up to date and ensure the UI binding is accurate.
To answer your question on how to use an expression to target a dynamic tag, the tag() expression function allows us to dynamically alter the string representation of a tag path. tag | Ignition User Manual
But as Phil noted, the custom property approach will yield the best results.
I do have a custom param that is being used to determine which machine the program is running on:
I am just not sure how to reference this within the expression structure.
You'll have much more future flexibility if you design your views to take a single tagpath parameter, containing the entire provider and folder name (or UDT instance name), not just part of a tag path. Instead of ENumber: E398, it would be tagpath: [default]E398/E398/JobscanInfo/ or similar. (You probably should avoid the double naming in your hierarchy.)
Then your indirect binding looks like {1}JobScan where {1} is tied to view.params.tagpath. (Don't tie to a session variable except at the page level, so it all cascades inward.)