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

How to use foreign Key as a filter in Service Template

Solved397 views28th November 2023
0
Aditiben Desai [DevOps Member]372 23rd November 2023 0 Comments

Hello,

I am building service template and in that I want to filter the table using foreign key of that table. How I can use that directly in service template?

I have already saved foreign key in automation script so I have to filter an entire table based on foreign key.

Please share your thoughts on this.

Thanks.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 28th November 2023

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Jeroen Nietvelt [SLC] [DevOps Advocate]1.34K Posted 27th November 2023 0 Comments

Hi Aditiben,

Interesting case you have there. We would need to approach this a bit different I believe but you are indeed on the right track when thinking about creating the right filter for your table parameters, as this is what you need to define when selecting the table parameters you want to include in your service.

When filtering you can choose to apply this filter on 2 columns of your table. One column being the primary key column and the other one being your display key column. By default the filter is always applied directly on the display key column. This column typically has "[idx]" appended in the column name.

In case you need to apply the filter on the primary key column instead, you can start your filter with ^pk^ . This will indicate to the software that you want to apply the filter on the primary key instead of the display key.

On top of that, we also have a capability that allows you to retrieve a value from a parameter of an element and use this value in your filter. What you then create can be described best as a nested filter. Here's an example of such a nested filter:

* ([element:1:param:4151:*/ [data:outputmcrödelheim]:5000 *]) /*

What this filter does is look at the included service element with id 1 and take the value from parameter with id 4151. In this case this is a table parameter so an extra filter */ [data:outputmcrödelheim]:5000 * is also configured to indicate the row to take this value from. The * character can always be applied as a wildcard mask. [data:outputmcrödelheim] is referring to a value that is coming from the input data we configured on the service template.

When this is being resolved by the software it will look at the input data variable named "outputmcrödelheim" and use this in the filter defined for the parameter placeholder --> for example [element:1:param:4151:*/ 232.102.51.2:5000 *] this will allow the system to retrieve the value of column parameter with id 4151 that matches the filter */ 232.102.51.2:5000 *. This value being 10.241.65.18

This results into the following filter  * (10.251.65.18) /* that will be eventually applied on the parameter you are filtering on in your template.

You can configure these kind of nested filters directly in the editor where you select your parameters which you want to include in your service:

It's through building these kinds of nested filters that you will need to try and compose the right filtered dataset for table parameters on included service elements.

Making sure that your table display key contains the right set of information is always key in systems where a service layer is being deployed. As this can clearly simplify or complicate the filter definitions required when configuring your services.

So you your case, take a look at the display key and primary key of the tables you want to include in your service. Then see if you can somehow (via static input or via input data or via dynamic parameter retrieval) get value that will filter out the correct row.

Hope this could help you out a bit further! If you get stuck somewhere, definitely feel free to reach out again!

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 28th November 2023
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

Web Applications exception in Cube due to invalid certificate 0 Answers | 0 Votes
Redundancy Groups and Alarming – Duplicate Alarms 0 Answers | 0 Votes
Correlation Engine: “Test rule” doesn’t result in a hit, despite functional rule 1 Answer | 3 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 (151) 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