Replies: 8 comments 4 replies
-
Hi Jon Without researching this in detail, couldn't this be achieved natively in Knack? My thought would be to create a Yes/No field for "Is note editable" with the default value being Yes. Then use a Record Action to Update this record to field value = No when your criteria is met. Dean |
Beta Was this translation helpful? Give feedback.
-
Hi Dean, that you for the response, but I've tried something similar to your suggestion natively in Knack, but can't seem to make it work as expected. Any and all suggestions including a script would be highly appreciated... JON |
Beta Was this translation helpful? Give feedback.
-
Hi Jon Here's a "proof of concept" I quickly knocked up by manually setting the "Is note editable" values. Glad to have gone through this quick exercise because until now I didn't realize you could set display rules for the buttons. Dean |
Beta Was this translation helpful? Give feedback.
-
Hi Dean, I thank you for your "proof of concept" but I'm not sure how this will achieve what I asked in my initial post. I'm looking for a way to "disable" the ability for any one without "admin" rights the ability to edit a current note if that note (field) contains a certain keyword. In my initial post, as an example, I used the keyword "move" to make the notes field "locked" to anyone without admin rights. Example: notes field is "move equipment to Dallas". Notes field is now NOT editable, except by admin because of keyword "move" With the help of OpenGPT I tried several JavaScripts with no luck. Seems like I'm fighting Knack's built in field editable settings in builder. I tried multiple scripts and turn edit field off/on with no luck Again thank you for your help and if you find a solution, please let me know... JON |
Beta Was this translation helpful? Give feedback.
-
Craig Thanks for stepping in with a solution. Dean |
Beta Was this translation helpful? Give feedback.
-
Can you post your code and I'll take a look in the morning?
Craig
…On Mon, 7 Oct 2024, 22:54 jbk68, ***@***.***> wrote:
Hi Craig, thanks for the response. I'm pretty sure I tried something like
your suggestion and couldn't get it to work. I didn't try the KTL function
YET, just trying to get the field to NOT be editable with keyword "MOVE".
Most likely something in my code was wrong.
Thanks again... JON
I
—
Reply to this email directly, view it on GitHub
<#382 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACQQXA2R64NEF7XSBIJ7W73Z2L7J5AVCNFSM6AAAAABPFQD4IOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBXGMZTSOA>
.
You are receiving this because you commented.Message ID:
<cortexrd/Knack-Toolkit-Library/repo-discussions/382/comments/10873398@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Yes. I'm going to give it one more try with GPT and specifically use your
suggestions. Regardless if I get a working solution or not, I'll post the
script.
Thanks again Craig and Dean... JON
On Mon, Oct 7, 2024 at 4:56 PM Craig Winnall ***@***.***>
wrote:
… Can you post your code and I'll take a look in the morning?
Kind regards,
Craig Winnall
07543423538
On Mon, 7 Oct 2024, 22:54 jbk68, ***@***.***> wrote:
> Hi Craig, thanks for the response. I'm pretty sure I tried something
like
> your suggestion and couldn't get it to work. I didn't try the KTL
function
> YET, just trying to get the field to NOT be editable with keyword
"MOVE".
> Most likely something in my code was wrong.
>
> Thanks again... JON
>
> I
>
> —
> Reply to this email directly, view it on GitHub
> <
#382 (reply in thread)>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/ACQQXA2R64NEF7XSBIJ7W73Z2L7J5AVCNFSM6AAAAABPFQD4IOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBXGMZTSOA>
> .
> You are receiving this because you commented.Message ID:
> <cortexrd/Knack-Toolkit-Library/repo-discussions/382/comments/10873398@
> github.com>
>
—
Reply to this email directly, view it on GitHub
<#382 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAZFANHBEM5YJNXQCQ2D7GLZ2L7QFAVCNFSM6AAAAABPFQD4IOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOBXGM2DCNI>
.
You are receiving this because you authored the thread.Message ID:
<cortexrd/Knack-Toolkit-Library/repo-discussions/382/comments/10873415@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Craig, finally got it to work using your suggestion. Below is the script. I even added a lock icon when user hovers over field. Thanks for your help $(document).on('knack-view-render.view_85', function(event, view) {
}); // Add hover effect to show the lock icon when hovering over the field_51 cell |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Not sure if KTL currently or has the potential of doing the following:
I have a particular field (Notes) that I have allowed the end user to add or edit notes to. What I would like to do is, if I edit or add a note to this field and have a particular keyword in the notes, this would disable anyone but an Admin to edit or override notes.
Here's an example:
Note field contains "move equipment to Dallas location". In this case, the word "move" would be the magic keyword which would disable anyone WITHOUT admin rights to edit (delete/modify etc...)
Another way that this could be done is:
I have a multiple choice field that is only editable by Admin's. If this multiple choice was set to "MOVE", this would disable the ability for anyone without Admin rights to edit Notes field until the multiple choice field was set to something other than "MOVE"
Any and all help would be appreciated... JON
Beta Was this translation helpful? Give feedback.
All reactions