Knack Toolkit Library

Thanks Norm, I’ve managed to suss this out… Thanks for quick responce

Vin

1 Like

I’ve installed KTL and I’m looking forward to putting it to use immediately, but I was hoping for a specific feature that I don’t see. I would like some way to auto-dupe specific fields during “heads down” data entry. In Access, this is done with the ctrl-apostrophe key combination, which fills the current field with the same value as found in the previous record. Any tips greatly appreciated!

Hi Richard,

There are two KTL features that may help you with repetitive data entry:

_rlv (Reload Last Values):
Keywords · cortexrd/Knack-Toolkit-Library Wiki

and

_ac (Auto Complete):
Keywords · cortexrd/Knack-Toolkit-Library Wiki

Besides that, it would require some custom coding.

Hope it helps,
Norm

With a little help from my “Expert” Carl Holmes, I’ve been able to implement the _rlv feature on 2 different forms, and it does EXACTLY what I needed! We also implemented some custom JavaScript code to automatically refresh the parent table when exiting the Add form so the new records would show immediately without requiring the user to refresh. Not sure if that was KTL code or something Carl had in his toolbox, but it works great. I’m beginning to feel like this utility billing project may actually work, afterall!

$(document).on(‘knack-form-submit.view_30’, function (event, view, record) {
Knack.views[“view_29”].model.fetch();
});

2 Likes

Thanks @BajaRic - interesting to use the _rlv (Reload Last Values) keyword from @NormandDefayette_CortexRD amazing KTL library.

The refreshing of the table after form submit is just a little bit of JavaScript. With a bit more patience I’m sure I could have found a KTL method. :wink:

1 Like

Yes indeed, to refresh any view in a page after a Form has been submitted, you can use the keyword

_rvs: Refresh View after Submit (click to see documentation)

There’s also its companion keyword
_rvr: Refresh View after Refresh

That can be used to create a daisy-chain of view refreshes in sequence.

Both support multiple views to be refreshed, not just one.

Have fun,
Norm

Thanks @NormandDefayette_CortexRD - I have updated @BajaRic views with RVS and removed the snippets of JavaScript - much easier - works great :+1:

1 Like

Good morning!

Love the KTL and all the support for this amazing add on! One of my teachers asked about sticky column headers. Currently our student info table has the first 6 columns sticky and all of the headers should be sticky. The issue is all the column headers stick, EXCEPT the first 6 columns that are sticky right to left. When you scroll up and down, the first six column titles disappear but the rest stick. I am attaching a video. Super strange because this is working in all of my other systems and I am using the same KTL script. Please see the video. Any help would be greatly appreciated! :slight_smile:

Sticky Column Headers Not working.mp4

Dan

Hi Dan

Try changing the _sth value as the value 500 might be the issue.

_sth=numOfRecords, viewHeight

Sticky Table Header

Used in: Views

Supported Options: None

When used in a grid it will add a height to the grid and stick the header while the records scroll. It can take up to 2 parameters _sth=numOfRecords, viewHeight or you can just add _sth and the default parameters of numOfRecords = 10 and viewHeight = 800px. The number of records is the minimum number of records the table needs to have before the sticky header is applied. This stops the rows stretching to fill the height of the view i.e. If the grid has nine records the header will not stick.

Examples:

_sth=, 1000 // will stick the header if grid has more than 10 records and add a height of 1000px

_sth=3, 300 // will stick the header if grid has more than 3 records and add a height of 300px

Video tutorials:

https://www.youtube.com/watch?v=4Sx5CRcS5M0

https://www.youtube.com/watch?v=fDOiPihGnnQ

If you have any other KTL questions then post them on cortexrd/Knack-Toolkit-Library · Discussions · GitHub

Dean

Hi @Dan3,

This may be a bug or a shortcoming of combining sticky columns and headings. I’ll loop in @CSWinnall and @NormandDefayette_CortexRD but you’ll likely get a quicker reply if you can raise this KTL issue on GitHub as its not a Knack query:

1 Like

Hi @Dan3

I’ll do some testing tomorrow morning and get back to you. This shouldn’t happen. To be fair I have never tested this on 6 columns but I’m not sure why that would matter.

I would also second @CarlHolmes suggestion of posting KTL issues on github.

Craig

1 Like

HI Dan

I can’t replicate this issue. I am happy to jump on a call if you’d like and I can take a look. DM me.
For future reference if you have sensitive data when making a video you can use this keyword:
https://github.com/cortexrd/Knack-Toolkit-Library/wiki/Keywords#_obffield1-field2

This will hide your data from the viewer.

Craig

Tried and no go. The Headers in the first rows disappear regardless of the STH numbers used. Thanks for trying!

I have submitted a GIT Hub issue with the KTL code. I probably messed something up in there, but this is still not working in this app, but it works in my others which is super weird!

@CSWinnall
Hey Craig,
I was having the same issue and created my own version of sticky columns and headers for the educational experience.
I use KTL for quite a bit (Love IT!)
I created a gist of just me sticky function.
You’re welcome to use any part if it helps.

I’ll also share it on the KTL Github on @Dan3’s issue if I can find it.