Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Trigger & QAction to set a link between FK and PK

Solved1.12K views18th July 2023Dynamic virtuals elements foreign key primary key SNMP
2
Francisco Javier Pascual [DevOps Advocate]52 27th August 2021 0 Comments

Hi,

since a few weeks we are trying to set up some elements with Dynamic Virtual Elements (DVE). Some of the relations works good but we have seen in one Video related to this theme, that some times, some SNMP Tables need a Trigger and a QAction to fill up it. We have already tryed but we didn´t the way to do that. We have read a lot of protocols examples but we are not capable. Could anyone help us to find the way to set up the link between a Foreign Key and a Primary Key to fill up a a DVE - SNMP Table.

Thanks

Francisco

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 18th July 2023

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
3
Floris Cockaerts [SLC] [DevOps Advocate]2.43K Posted 30th August 2021 3 Comments

Hi Fransisco,

There's a few topics to unpack here.

First, a QAction with a table PID as trigger will be executed when that table changes, but not if those changes are made through a QAction. So in case of SNMP tables, if a poll cycle happened and any of the data changed, it should trigger the QAction.

Second, SNMP tables only mesh with columns of type "custom", and not "retrieved". The retrieved columns need to be at the end of the table definition as far as I remember.

Third, once you've filled up your additional column with the desired values, which I presume is your FK to another table here, we need to make sure the FK is defined correctly. It needs two things to work:

  1. The "foreignkey=" option on the column definition with the PID of the linked table (e.g. <ColumnOption idx="10" pid="1011" type="custom" options=";foreignKey=1100"/>).
  2. A relation path that lets dataminer know the correct way of resolving these links (Protocol.Relations.Relation, e.g. <Relation path="100;200">). This may seem arbitrary for just two linked tables, but is crucial for more complex setups.

Fourth, there's multiple ways to set up DVEs structurally. You could add the DVE column to the SNMP table, which doesn't give you a lot of control over the lifetime of the DVE. This is often paired with a state column to avoid losing a DVE as soon as the row is removed from the device. Another way is to keep a separate table and link with a foreign key to allow for some more control. But I believe the best practices here fall into the domain of the protocol development team, their protocol examples, and the development guide.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 18th July 2023
Francisco Javier Pascual [DevOps Advocate] commented 30th August 2021

Hi Floris,

first of all, thanks for your tips.

About the use of type “custom” instead of “retrieved”, I have change it, but for the moment I saw no effect.

I think that the third point is the clue for that issue. I have already set the “foreignKey” option and the Relations between the two SNMP Tables (100;200) as you have explained.

I have followed the instrucctions shown in three differents protocol examples and Videos and it doesn´t matters what I do, the FK Column at Table 200 related to table 100 is always “not initialized”.

I hope the Protocol Development Team could be able to help me to find the mistake to this issue.

I will keep trying. Thank you very much.
Francisco

Floris Cockaerts [SLC] [DevOps Advocate] commented 30th August 2021

Hello Francisco,
If the column is “not initialized”, then it is not being filled in correctly. Are you sure your qaction is using the correct calls to set these cells? Have you checked the element’s logging for any error that might be linked to your sets, giving us some indication of what is going wrong?

Simon Vandamme [SLC] [DevOps Advocate] commented 30th August 2021

Hi Francisco,
As stated by Floris, your column is currently not correctly being filled in so your next step is to identify where it fails. To find that out, I would follow the following approach:
1. Is the QAction correctly triggered?
Adding a protocol.Log(…) call as first thing in that QAction entry point will allow to check this. If the log entry doesn’t appear in the element logging, your QAction is not firing -> double check the different xml attributes on the QAction XML tag (mostly the QAction@trigger and the QAction@row attributes probably.
2. Is the call meant to update that column correctly executed?
Adding a protocol.Log(…) call next to the call meant to update the column will allow to check this. I the log entry doesn’t appear in the element logging, something is wrong in the logic of the QAction code.
3. Is the call meant to update that column actually working?
Which DataMiner call are you using here? If a call allowing to set multiple table entries in bulk is used (ex: FillArray, FillArrayWithColumn, etc), then the column type retrieved is necessary and then that column needs to be located towards the end of the table (as in after all snmp columns of it). If a call allowing to set only one entry/row a the time (ex: SetParameterIndexByKey, SetRow), then both a column with type ‘custom’ and ‘retrieved’ will do. But ‘custom’ will be required if the column needs to be followed by snmp columns for backward compatibility reasons.

Extra remark: If you’re familiar with it, everything part of the investigation I described via logging can also be achieved via DIS Inject feature which basically allows one to step through code at run-time making such investigations very convenient.

You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Correlation Engine: “Test rule” doesn’t result in a hit, despite functional rule 1 Answer | 3 Votes
When using the Setter = true attribute, will the copy action always be executed first? 1 Answer | 3 Votes
Multiple Set on Table parameters for DVE’s 1 Answer | 2 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (150) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin