I am trying to display the SPN (fault code standard for CAT engines) description in my project given the SPN number. Usually I would use a map transform on a binding to do something like this, but in this case there are 17K different possible fault codes that each have a unique description. So far I've tried pasting the list into VS code and formatting it like a map transform, but It wouldn't let me paste that as a binding onto the text property of a label. I've also tried to create a 2 column dataset with all the codes and their descriptions. This worked with a smaller test set that I tried, but would break when I tried to do all 17K rows. Does anyone else know of a better way to do something like this when you have a large number of mapped input/output pairs.
Seems like storing these in a database and doing a query would be appropriate.
Use a named query and enable caching.
Is there a way to do this on an Edge Gateway?
Do you have the compute plugin for gateway scripting access?
Consider constructing a static dataset in a memory tag. Then use the
lookup() expression function.
I have used @pturmel's dataset memory tag solution before, works great, even with much larger datasets.
What I would probably do is to use a dataset tag as phil suggests, but then create an expression tag in the UDT which does the lookup. Then you have a single tag you can reference everywhere with the fault code in it
The dataset method ended up working for me. I thought 17K might have just been to large for that method when it didn't work initially, but apparently there were quotation marks in a few of the fault descriptions that were messing it up. Once I fixed those it handled the 17K perfectly fine.