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
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • 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
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
      • Learn more about 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)
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Pogram
    • DataMiner DevOps Support
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
  • Downloads
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Solutions
    • Deal Registration
  • >> Go to dataminer.services

Error trapped: Value cannot be null. Parameter name: key

140 views1 day agoautomation scripts GQI GQI custom operator
2
João Azevedo273 18th June 2025 0 Comments

Hello everyone, hope you all are well!! Can someone help me understanding why i'm getting the erro bellow when i link the collumn. I've created a custom operator to calculate the remaining time of a job following some tutorial documentations that i'll be linking bellow and some other examples that we developed in our dma, but i was unable to identify the source of this problem.

Thank you all in advance!

tutorial links:
Building a GQI custom operator that calculates a duration | DataMiner Docs

Creating a minus operator | DataMiner Docs

My code is:
namespace remainingTimer
{
    using System;
    using System.Globalization;
    using Skyline.DataMiner.Analytics.GenericInterface;
    using Skyline.DataMiner.Automation;

    [GQIMetaData(Name = "Remaining_Time")]
    public class RemainingTime : IGQIInputArguments, IGQIColumnOperator, IGQIRowOperator
    {
        private readonly GQIColumnDropdownArgument _endTimeColumnArg = new GQIColumnDropdownArgument("End Time") { IsRequired = true }; // Input Argument to be requested from the user;

        private GQIColumn _endTime;
        private GQIColumn _remainingTime;

        public GQIArgument[] GetInputArguments()
        {
            return new GQIArgument[] { _endTimeColumnArg };
        }

        public OnArgumentsProcessedOutputArgs OnArgumentsProcessed(OnArgumentsProcessedInputArgs args)
        {
            _endTime = args.GetArgumentValue(_endTimeColumnArg);
            return new OnArgumentsProcessedOutputArgs();
        }

        public void HandleColumns(GQIEditableHeader header)
        {
            header.AddColumns(_remainingTime);
        }

        public void HandleRow(GQIEditableRow row)
        {
            var end = row.GetValue<DateTimeOffset>(_endTime);
            if(end != null){
            var duration = end - DateTimeOffset.Now;
            row.SetValue(_remainingTime, duration);
            }   
        }
    }
}

Ronald Gerard [SLC] [DevOps Advocate] Answered question 1 day ago

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
2
Ronald Gerard [SLC] [DevOps Advocate]1.89K Posted 1 day ago 6 Comments

Hi João,

The _remainingTime column you are using is not initialized yet (it still has value null).

Solution

Initialize _remainingTime with a new GQIColumn instance like so:

private static readonly GQIColumn<TimeSpan> _remainingTimeColumn = new GQITimeSpanColumn("Remaining time");

Some additional info:

  • Since the column does not depend on the input arguments, it can be defined as a static readonly field
  • The column is defined by a combination of its type and its name.
    In this case, the type will be TimeSpan and its name will be "Remaining time".
  • For sake of readability/maintainability, it helps to rename _remainingTime to _remainingTimeColumn

Additional notes

It is indeed not explicitly stated in the tutorial for calculating a duration how to do this since that is not the main focus of the tutorial. Fortunately, the quick start package that is available for it on the catalog does the initialization in the constructor like this:

_durationColumn = new GQITimeSpanColumn("Duration");

Furthermore, the error message you got was very uninformative so we will make sure to improve that one in the future.

João Azevedo Posted new comment 21 hours ago
João Azevedo commented 1 day ago

Hi Ronald, thank you for your help, i've made the changes that you have addressed but unfortunately it won't worked. Maybe the problem is in the data source itself as it is an adhoc that was made by Skyline and i can't locate it in our Cube to check. I'll try to contact the person who helped us made it and try to fix it.

Ronald Gerard [SLC] [DevOps Advocate] commented 1 day ago

Do you still get the exact same error? Because the uninitialized column was without a doubt the reason for it.
Maybe the new version of the operator you made failed to load properly somehow? Does it compile correctly in Cube still?

João Azevedo commented 24 hours ago

Yes, the same error persistis. I think it compiles successfuly because when i click in the validate button ir returns no errors.

Ronald Gerard [SLC] [DevOps Advocate] commented 23 hours ago

Curious. You could check in C:\Skyline DataMiner\Scripts\Libraries if the latest build of the custom operator library exists. There should be a file named <script-name>.<library-name>.<compile-time>.R.dll for your script with a recent compile time.

If you're on a development/staging setup, you can also try removing any older versions and restarting the SLHelper process to reload the custom operator.

Otherwise, feel free to create a support ticket for us to look into it further: https://docs.dataminer.services/user-guide/Troubleshooting/Contacting_tech_support.html

João Azevedo commented 23 hours ago

I've checked the path you informed and the dll exists. I've restarted the SLHelper as oriented, but nothing of this seen to be working, i keep getting the same error reported.

Here is the actual code, the rest remain the same:
[GQIMetaData(Name = "Remaining_Time")]
public class RemainingTime : IGQIInputArguments, IGQIColumnOperator, IGQIRowOperator
{
private readonly GQIColumnDropdownArgument _endTimeColumnArg = new GQIColumnDropdownArgument("End Time") { IsRequired = true }; // Input Argument to be requested from the user;
private static readonly GQIColumn<DateTime> _remainingTimeColumn = new GQIDateTimeColumn("Remaining time");

private GQIColumn _endTime;
private GQIColumn _remainingTime;

public GQIArgument[] GetInputArguments()
{
return new GQIArgument[] { _endTimeColumnArg };
}

public OnArgumentsProcessedOutputArgs OnArgumentsProcessed(OnArgumentsProcessedInputArgs args)
{
_endTime = args.GetArgumentValue(_endTimeColumnArg);
return new OnArgumentsProcessedOutputArgs();
}

public void HandleColumns(GQIEditableHeader header)
{
header.AddColumns(_remainingTime);
}

public void HandleRow(GQIEditableRow row)
{
var end = row.GetValue<DateTimeOffset>(_endTime);
if(end != null){
var duration = end – DateTimeOffset.Now;
row.SetValue(_remainingTime, duration);
}
}
}

Show 1 more comments
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
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