Sign In Help
Schneider Electric
HelpSign In
Schneider Electric Exchange
  • Home
  • Collaborate
  • Develop
  • Shop
Home Collaborate Develop Shop Log in or Register Help

Invite a Co-worker

Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel

Invitation Sent

Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
  • Home
  • Collaborate
  • Exchange Community
  • :
  • SCADA & Telemetry Solutions
  • :
  • Geo SCADA Expert Forum
  • :
  • Re: List functionality
Community Menu
  • Forums
    • By Topic
        • EcoStruxure IT
          • EcoStruxure IT forum
        • Industrial Automation
          • Industry Automation and Control Forum
          • Alliance System Integrators Forum
          • Machine Solutions in the Digital Transformation
          • EcoStruxure Automation Expert / IEC 61499 Forum
          • Industrial Edge Computing Forum
          • Level and Pressure Instrumentation Forum
          • Modicon User Group
          • PLC Club Indonesia
          • SEE Automation Club Forum
          • Fabrika ve Makina Otomasyonu Çözümleri
          • Форум по промышленной автоматизации СНГ
        • SCADA & Telemetry Solutions
          • Geo SCADA Expert Forum
          • SCADA and Telemetry Devices Forum
        • Power Distribution IEC
          • Power Distribution and Digital
          • Power Standards & Regulations
          • Paneelbouw & Energie Distributie
        • Power Distribution Softwares
          • EcoStruxure Power Design Forum
          • SEE Electrical Building+ Forum
          • LayoutFAST User Group Forum
        • Solutions for your Business
          • Solutions for Food & Beverage Forum
          • Solutions for Healthcare Forum
    • By Segment
        • Food & Beverage
          • Solutions for Food & Beverage Forum
        • Healthcare
          • Solutions for Healthcare Forum
      • EcoStruxure IT
        • EcoStruxure IT forum
      • Industrial Automation
        • Industry Automation and Control Forum
        • Alliance System Integrators Forum
        • Machine Solutions in the Digital Transformation
        • EcoStruxure Automation Expert / IEC 61499 Forum
        • Industrial Edge Computing Forum
        • Level and Pressure Instrumentation Forum
        • Modicon User Group
        • PLC Club Indonesia
        • SEE Automation Club Forum
        • Fabrika ve Makina Otomasyonu Çözümleri
        • Форум по промышленной автоматизации СНГ
      • SCADA & Telemetry Solutions
        • Geo SCADA Expert Forum
        • SCADA and Telemetry Devices Forum
      • Power Distribution IEC
        • Power Distribution and Digital
        • Power Standards & Regulations
        • Paneelbouw & Energie Distributie
      • Power Distribution Softwares
        • EcoStruxure Power Design Forum
        • SEE Electrical Building+ Forum
        • LayoutFAST User Group Forum
      • Solutions for your Business
        • Solutions for Food & Beverage Forum
        • Solutions for Healthcare Forum
      • Food & Beverage
        • Solutions for Food & Beverage Forum
      • Healthcare
        • Solutions for Healthcare Forum
  • Blogs
    • By Topic
        • Industrial Automation
          • Industrial Edge Computing Blog
          • Industry 4.0 Blog
          • Industrie du Futur France
        • SCADA & Telemetry Solutions
          • SCADA and Telemetry Blog
        • Power Distribution IEC
          • Power Events & Webinars
          • Power Foundations Blog
        • Power Distribution NEMA
          • NEMA Power Foundations Blog
        • Power Distribution Softwares
          • EcoStruxure Power Design Blog
          • SEE Electrical Building+ Blog
        • Solutions for your Business
          • Solutions for Food & Beverage Blog
          • Solutions for Healthcare Blog
          • Solutions for Retail Blog
        • Community experts & publishers
          • Publishers Community
    • By Segment
        • Food & Beverage
          • Solutions for Food & Beverage Blog
        • Healthcare
          • Solutions for Healthcare Blog
        • Retail
          • Solutions for Retail Blog
      • Industrial Automation
        • Industrial Edge Computing Blog
        • Industry 4.0 Blog
        • Industrie du Futur France
      • SCADA & Telemetry Solutions
        • SCADA and Telemetry Blog
      • Power Distribution IEC
        • Power Events & Webinars
        • Power Foundations Blog
      • Power Distribution NEMA
        • NEMA Power Foundations Blog
      • Power Distribution Softwares
        • EcoStruxure Power Design Blog
        • SEE Electrical Building+ Blog
      • Solutions for your Business
        • Solutions for Food & Beverage Blog
        • Solutions for Healthcare Blog
        • Solutions for Retail Blog
      • Community experts & publishers
        • Publishers Community
      • Food & Beverage
        • Solutions for Food & Beverage Blog
      • Healthcare
        • Solutions for Healthcare Blog
      • Retail
        • Solutions for Retail Blog
  • Ideas
        • Industrial Automation
          • Modicon Ideas & new features
        • SCADA & Telemetry Solutions
          • Geo SCADA Expert Ideas
          • SCADA and Telemetry Devices Ideas
  • Knowledge Center
    • Building Automation Knowledge Base
    • Industrial Automation How-to videos
    • Ask Exchange
    • Digital E-books
    • Success Stories Corner
    • Power Talks
  • Events & Webinars
  • Support
    • User Guide
    • Leaderboard
    • Releases Notes
How can we help?
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
49465members
Join Now
242753posts
Join Now

List functionality

Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Solved Go to Solution
Back to Geo SCADA Expert Forum
Solved
DavidSkilbeck
Lieutenant DavidSkilbeck
Lieutenant
‎2020-11-03 05:01 PM
0 Likes
6
438
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-03 05:01 PM

List functionality

Hi,

I have a number of questions about lists

 

1. Current1stColDataStr / Current1stColDataInt


I am working with a table that some else has created and they have of course used the first column for their purposes. I have to select information from another column (7) in the table when a row is selected.

 

SelectedRow = Mimic.Layers("Xxxxx").Item("Lst_2").Current1stColDataInt

 

What is the neatest way to do this?

Do I have write code something like - http://gtg.ddns.net:8080/file/help_en-US/Content/ScriptingGuide/Server.Query.htm or is there a more direct way.

 


2. Using Automation interface I would like to refresh lists from outside of Geo SCADA. Is this possible.

I could do it by code in Geo SCADA which would be run when I change a flag from the external source, but wondered if there is a more direct way.

 

I have looked at the Schema and I can't find specifically where information related to lists is, seems to be distributed.

(List is an object, I guess, so should be in schema?)

Thanks,

Solved! Go to Solution.

Labels
  • SCADA
Tags (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply

Accepted Solutions
AdamWoodland
Lt. Commander AdamWoodland Lt. Commander
Lt. Commander
‎2020-11-03 05:38 PM
0 Likes
0
433
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-03 05:38 PM

Re: List functionality

What table in the database are you querying?

 

If you're querying a data table then options are quite limited. If you're querying a proper Geo SCADA table with an Id column or a data grid that maps the id, then you get more functionality for addressing columns and rows. The id is special and provides the row a direct database object behind the scenes to get more info.

 

You mention the first column is used, but you can add your own first column in the SQL query and alias it starting with an underscore and the column is hidden. I haven't tested some of the newer properties but previously those first column properties would pick up on that (e.g. SELECT Something As "_Something" FROM Table). It is a bit of a trick but might do what you need.

 

I have used scripting to do a Server.Query using the same SQL as shown on the list and then picking the right row, the issue is concurrency and making sure things haven't moved since the list was shown.

 

In terms of refreshing the table, again if the row as an id from an object in the database (not a case of a column just called id, has to be from the database) the row contents should automatically update. Beyond that you can usually trick it by added in a blank space to the end of the SQL in the animations. The list on a mimic isn't an object in the database so can't use the Client API, but the ViewX API should be able to do what you're after.

 

Both of those are really dodgy workarounds, even if they do work they might change in the future so be careful.

See Answer In Context

Tags (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply
  • All forum topics
  • Previous Topic
  • Next Topic
6 Replies 6
AdamWoodland
Lt. Commander AdamWoodland Lt. Commander
Lt. Commander
‎2020-11-03 05:38 PM
0 Likes
0
434
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-03 05:38 PM

Re: List functionality

What table in the database are you querying?

 

If you're querying a data table then options are quite limited. If you're querying a proper Geo SCADA table with an Id column or a data grid that maps the id, then you get more functionality for addressing columns and rows. The id is special and provides the row a direct database object behind the scenes to get more info.

 

You mention the first column is used, but you can add your own first column in the SQL query and alias it starting with an underscore and the column is hidden. I haven't tested some of the newer properties but previously those first column properties would pick up on that (e.g. SELECT Something As "_Something" FROM Table). It is a bit of a trick but might do what you need.

 

I have used scripting to do a Server.Query using the same SQL as shown on the list and then picking the right row, the issue is concurrency and making sure things haven't moved since the list was shown.

 

In terms of refreshing the table, again if the row as an id from an object in the database (not a case of a column just called id, has to be from the database) the row contents should automatically update. Beyond that you can usually trick it by added in a blank space to the end of the SQL in the animations. The list on a mimic isn't an object in the database so can't use the Client API, but the ViewX API should be able to do what you're after.

 

Both of those are really dodgy workarounds, even if they do work they might change in the future so be careful.

See Answer In Context

Tags (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply
BevanWeiss
Admiral BevanWeiss
Admiral
‎2020-11-03 09:47 PM
0 Likes
4
423
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-03 09:47 PM

Re: List functionality

It does sound like a good opportunity for a feature request 🙂

 

I think the Current1stColDataStr/Current1stColDataInt was a bad API..

It would have really made so much more sense to have

CurrentRow.Col(col Idx).Str or CurrentRow.Col(col Idx).Int

 

and then you could have used any column index you wanted to get the value.

As Adam has said though, it sounds like if you can't swap out the first column with your own, then you'll pretty much have to script it around.  If the first column is a reference to a database object that is easier.  If it's custom data from the query, or from a datatable/datagrid/datagridset. then that's a lot more painful.  And you might just want to requery it to get your own local copy, and then index directly into that.  As Adam also said, concurrency is an issue, since the data you retrieve may not be the same as the data that the user is seeing (especially if row sort might be changed, so you'd definitely want to rule that out in some way).

 

Also as Adam said on item #2, Query Lists (on a mimic) aren't objects in the ClearSCADA database.  They are just a thing in a big binary blob that is the CMimic object as far as the ClearSCADA database is concerned.  It's only ViewX parsing the binary blob and reading between the bytes that makes it mean anything.

I'm less convinced that the ViewX API would help you here, since my experience has always been that it doesn't connect to an existing instance of ViewX but instead spawns its own instance, which means that the Query List you see won't be the Query List that any ViewX API instance would be issuing refreshes against.

Ways that I've worked around this kind of thing are:

1. Have the query be simple and tied to a DB intrinsic table (like CDPoint etc) in which case the refreshes are largely taken care of automagically

2. Have a horrible hack where the animation for the SQL query contains a reference to a property that you can control in some way (like a CValuexxx object, or a Registry field.. depending on if it should be a per user, or a per system refresh).

 

I'd really recommend trying to stick with path 1 if you can... it's a better performing and less ugly solution.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Tags (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply
DavidSkilbeck
Lieutenant DavidSkilbeck
Lieutenant
‎2020-11-04 05:19 PM
0 Likes
3
397
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-04 05:19 PM

Re: List functionality

Hi,

this was my original idea, but I am not sure it is going to work.

I'll try to describe as best I can. Sorry if it doesn't make sense.

 

1. I have a table which I am able to select a work order number from. As this is in the first column in this table and MsgBox seems to confirm.

 

2. I then have another table which I planed to use as a scratch pad. In that I would fill it with notes related to the work order number selected. Then would be cleared / deleted of contents prior to selecting another work order number.

 

Using the insert into table. Which I am having issues of adding a "where" to at the moment. Which I hoping is because I am not using the correct syntax. But may be down to the same issue of the first column. (WorkOrderID is a string).

 

("INSERT INTO NOTESSP (WorkOrderID , Xx2, Xx3, Xx4, Xx5, Xx6, Xx7, Xx8, Xx9, Xx10) (SELECT WorkOrderID , Xx2, Xx3, Xx4, Xx5, Xx6, Xx7, Xx8, Xx9,Xx10 FROM CNOTES WHERE WorkOrderID = '" + SelectedRow + "'" + "")

 

On this, I'm I able to set out the columns of the NOTESP in a different sequence and the Insert into table, would it still work?

So I could put NoteNumber as the first column? Which is a long and indexed and has unique numbers.

 

Hope this makes sense, apologies if it doesn't.

It may not work anyway.

Thanks,

Tags (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply
BevanWeiss
Admiral BevanWeiss
Admiral
‎2020-11-04 08:58 PM
0 Likes
2
386
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-04 08:58 PM

Re: List functionality

2. I then have another table which I planed to use as a scratch pad. In that I would fill it with notes related to the work order number selected. Then would be cleared / deleted of contents prior to selecting another work order number.

 

I'm a bit confused by this part.  What kind of 'notes related to the work order number selected' are you refering to?

Do you mean notes for an individual, or that should be visible to everyone?

And if visible to everyone, is there a reason that you wouldn't want them to just be recorded against the original Work Order table, so that when the Work Order is deleted etc then the notes are also deleted? (if the notes need to stick around beyond the life of the Work Order, then it seems having another table that you just add note rows into which have an indexed column against the Work Order ID would do the job)


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Tags (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply
DavidSkilbeck
Lieutenant DavidSkilbeck
Lieutenant
‎2020-11-04 09:17 PM
0 Likes
1
382
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-04 09:17 PM

Re: List functionality

Hi Bevan,

I totally agree "if notes need to stick around beyond the life of the Work Order, then it seems having another table that you just add note rows into which have an indexed column against the Work Order ID would do the job". Really glad you mentioned it.
It was my first suggestion. However, I think the intent is to have all notes of different sorts in one table.
It concerns me that both Adam and yourself highlighted issues with both previous mentioned work rounds.
Thanks,

Tags (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply
DavidSkilbeck
Lieutenant DavidSkilbeck
Lieutenant
‎2020-11-08 02:50 PM
0 Likes
0
336
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-11-08 02:50 PM

Re: List functionality

Hi,

I managed to get by for what I need to do with two lists, in the end.

I will mark Adams post as the answer as it was the first.

Thanks to both of you!

Thanks,

Tags (6)
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Share
Reply
Top Experts
User Count
sbeadle
Sisko sbeadle Sisko
1
BevanWeiss
Admiral BevanWeiss
1
See More Top Experts
Find a Service Provider
Find a certified partner to help you address your integration, installation, maintenance and project needs.
View all Providers
Support

Have a question? Please contact us with details, and we will respond.

Contact Us
FAQ

Look through existing questions to find popular answers.

Learn More
About

Want to know more about Exchange and its possibilities?

Learn More

Full access is just steps away!

Join Exchange for FREE and get unlimited access to our global community of experts.

Connect with Peers & Experts

Discuss challenges in energy and automation with 30,000+ experts and peers.

Get Support in Our Knowledge Base

Find answers in 10,000+ support articles to help solve your product and business challenges.

Ask Questions. Give Solutions

Find peer based solutions to your questions. Provide answers for fellow community members!

Register today for FREE

Register Now

Already have an account?Log in

About Us FAQ Terms & Conditions Privacy Notice Change your cookie settings
©2020, Schneider Electric