I have a component that works well and grabs data using the gateway to process or return to the component through delegates, but I need to pass in a datasource for what DB to grab the data from.
Is there a good way in the componentName.props.json
file to show all the available datasources in the gateway or select default as an enum?
I believe you could use this mechanism:
That sounds terrible and very un-Ignition-ish. Just accept a dataset property or a list of dictionaries--let the designer bind to actual data. Define the structure required.
(The IA components that do their own queries are the most annoying in the entire kit.)
So for example,
If I have a scripting function that goes out and gets the downtime data from our database as an option. You are suggesting it is better to not have a component that fetches that, and instead just accepts the data? I suppose, we were thinking about the Sepasoft model, but exceptionally faster, where their downtime table for example queries their database and displays the info.
I wanted to do something similar in terms of an easy drag and drop downtime table but allow actual customization.
Yes, allow your users to bind to your props.data
if suited, or to custom properties with further expressions, as they see fit, to allow customization that you cannot anticipate. Where possible, supply expression functions in addition to scripting functions, so scripting overhead can be minimized.
Although this is the solution, I agree with @pturmel. Makes a lot of sense, and I feel it is why we always end up just using the data from 3rd party module components like Sepasoft and making a more customizable component in Ignition. Thanks for the feedback both of you.
1 Like