No, it doesn't have access to the DB
So am I not able to make the tags work when I type serial number and to show the tester status for that serial number alone
Memory tags have no external connection, so without a connection to the source (DB as stated by you), how do you expect to get a status?
Memory tags hold a value in memory, they can only be changed by something inside of Ignition. You can use memory tags, but there has to be something that goes out and gets the information from the DB, otherwise the value of the tags will only ever be what you have placed in the tags as the value.
Ok, so the only chance to get the solution is through DB, am I correct?
If that is the only source of the data, then yes at some point you will need a connection to the DB.
ok, thanks for your explanation in detail..
Is there any other possible way to make dummy serial number and under that to create tester status other than connecting it from DB and memory tags
If it's gonna be using a database in prod, don't develop it using tags.
The simplest thing to do is to set up a dev database, insert dummy data in it, and use that.
What is your goal of the dummy data or dummy tags?
If you are just making dummy tags and dummy data, you can do that in memory tags.
Can make your own tags and run scripts on those dummy tags.
Can install the an sql server on your computer for testing.
Connecting to Microsoft SQL Server Express Video at Inductive University]
Alternatively, you could write a script that set a tag based on the current minute of the gateway time.
Now I got connected to the DB, how can I get EOL and IN line tester status from DB by typing the serial number in the text field.
How can I bring this from DB
You will need to create a named query with a parameter to accept the serial number.
Then bind your indicators to the result of that query.
To help more, I really need to have a better understanding of how you have your view set up.
Here I need to type serial number in the text box and if I click the search icon button or press enter then it should display tester names with their pass, null status like this in below pic ..
Here it should display the pass,null status of the testers from DB tags (left bottom) for that serial number like this...
@lrose
Since these are on two different views, you will need to use a message handler on your components.
I suggest that you use a project script to call the named query and then you can use system.perspective.sendMessage()
can be used to trigger a message handler on the components with then needed information.
See:
https://docs.inductiveautomation.com/display/DOC81/Component+Message+Handlers
and
https://docs.inductiveautomation.com/display/DOC81/system.perspective.sendMessage
for more information.
SELECT TESTERNAME, PASSFAILSTATUS
FROM UT_INTELLIPAK.FPYDPUVIEW
WHERE dbid IN (SELECT DISTINCT dbid
FROM UT_INTELLIPAK.uutinfo
WHERE value = 'C18L08684')
Can this select statement helps us in making it easier?
You will need to run that query to get the information from the DB. Construct a named query with that, and then call it to have the data returned.
https://docs.inductiveautomation.com/display/DOC81/Named+Queries
I've created named query..
Can you help me, What I should do now for typing the serial number in the text field and by pressing enter button or clicking search icon to get their pass, untested status on another view?
I've bind the text field with named query,
You really need to look at the Inductive University. Your questions are all answered there and will give you an introduction to working In Ignition
- Create a Perspective session variable in the Perspective Property Editor window under SESSION CUSTOM. Call it
sessSerialNum
. This is now, effectively, a global variable accessible to the session. - Create a property binding on the serial number text field.
- Bind it to session.
custom.sessSerialNum
. - Make the binding Bidirectional.
- Bind it to session.
- Create a named query to retrieve TESTERNAME and PASSFAILSTATUS from the database.
- In the WHERE clause use,
WHERE value = :serialNum
. - Set Query Type to 'Query'.
- Add a parameter of Type = Value, Name = serialNum, Data Type = Int8.
- Test the query on the Testing tab.
- In the WHERE clause use,
- On the view where you want to look up the serieal number ...
- Create a query property binding on the component.
- You will be prompted to add the serialNum parameter. Create a property binding to
custom.sessSerialNum
.
Tips
- Don't capitalise everything in your SQL. It makes it very hard to read. I use lowercase for variables, etc. Some DBs don't allow capitals for column names.
- In the forum, paste code, not pictures of code. Format it using the </> button to format it properly.
- Use session variables to pass data between views but make sure that you are making a well designed user interface that will work in a similar fashion to Windows / Linux / Mac / Android interfaces that users are familiar with.
Well... The error is pretty clear. The text
property expects... text. And you're giving it a dataset.
I suggest you do as Nick said and go through the university. It will teach you the basics, so you don't need to come here and ask for help on every little thing - this is frustrating for us, and it's also very inefficient for you. You shouldn't have to ask for help when the designer clearly tells you what's wrong with what you're doing.
The community here is VERY helpful. You'll always find help and tips. But you also need to make an effort to not rely on it for everything.