Free JavaScript Library for Knack

Hello folks, 

We are making public part of the JavaScript code we've written across many years of working with Knack API.

These free version allows you to:
1. Create
2. Delete
3. Update
4. Find

The main objective is that you can save valuable time from developing JS in Knack!

Find it here: https://github.com/SOLUNTECH/KnackJS

@miguel --It appears so.

I was wondering the same than Justin, doesn't this code expose your API key to all users? 

Are you always exposing the API key? I would love to see a version based on the user token.

None the wiser really - how would I loop through the returned record, how would I refer to them etc?

In the meantime, I've solved the immediate requirement with Integromat which is my tool of choice for such things with Knack.

 

Hi Julian, 

Yes, the code to process those records returned by the 'find' method should be processed within the '.then' function. For example

.then(function (response) {

// do something with the reponse.

});

To make a search for records where Start Time is not blank and End Time is blank, you would need to set the operator and values. 

If you need some further help, please feel free to contact me directly on alex@soluntech.com

Best,

Hi - great to see - but before I give it a try I have a couple of things I really don't understand (I'm definitely NOT a JS developer).

 

With the find methods, how do I do anything with the record(s) returned? (I assume some code goes where the '...' is but what??)

Also, with find, how do you select records based on multiple criteria?

Right now I have a use case of searching for TimeSheet records where the Start Time is not blank and the end time is blank and then create another record (in another object) for each of those found.

 

Well that's fantastic and i can't wait to have a play with - thanks again!

Sorts out a recent feature request I'd posted https://support.knack.com/hc/en-us/community/posts/360040238951-Extend-API-with-custom-methods-handlers