Jump to content
Ketarin forum

New column in interface


rainroom
 Share

Recommended Posts

I would like to have some add. info whether a package has a setup or not?  Would like to add 1 add. column 'setup' and have this filled with Y or N depending if setup instructions are available or not.  Not sure how to achieve this?  I would think of setting a variable and fill this with 'Y' or 'N' as textual content but that seems not the work this way.

Any assistance/guidance is welcome.

Thanks in advance. 

Link to comment
Share on other sites

unfortunately, i dont think it's possible to reference the setupinstructions field in the current context. it's been tried and reported as an issue in the past, but not currently supported. when it is, something like "{property.setupinstructions:regexreplace:(.+):x}" which will make those with setup instructions display an 'x' and those without show nothing.

until then, for those apps that you have included setup instructions you can create a custom app variable (text), such as "setup" with a yes or no value, then use {setup} in the custom column value.

Link to comment
Share on other sites

You could use a PS variable.

Make a PS script for checking the number of setup instructions (C#: app.SetupInstructions.Count), then create a textual variable with that script and run it with the "ps" variable function within a column.

Link to comment
Share on other sites

  • 3 months later...
  • 4 months later...

I created a global variable named "countSetup" with value "$app. SetupInstructions.Count" and used for a custom column named "Setup?" with value "{countSetup:ps}".

The column only shows zeros even for the jobs that have one (or more) setup instruction.

Any ideas?

Link to comment
Share on other sites

Problem is that Ketarin will only display cached content in custom columns (for performance reasons). Since your variable is never used other than in custom columns though, it never evaluates and this also never has some cached content to use.

It would be necessary to declare custom columns as "force execution" when you are aware of the implications in regard to performance issues. The easiest way for such an implementation would be agreeing to prefixing column names with "!" in order to force execution. I could also add an editable checkbox, a bit more annoying to implement though.

Link to comment
Share on other sites

Quote

Since your variable is never used other than in custom columns though, it never evaluates and this also never has some cached content to use.

So when I add a variable (e.g. named "hasSetup") to a job with "{countSetup:ps}" as its textual content and use that variable instead for the custom column "Setup?" it should display the approppriate value? That is, after an update of the job.

Link to comment
Share on other sites

18 hours ago, shawn said:

that's a great idea, @floele. I think the "!" identifier would be a great inclusion. tying it to pre-check would probably also work, but would be messier.

OK will add it for the next version. Now the most fancy solution but I suppose it's fine for the low demand so far.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.