bookish Posted March 30, 2023 Report Share Posted March 30, 2023 Is there a way to disable inline edit when one field is "No." I have an activities table where I can assign a person in-charge but clicking DETAILS and I make the edits in the details page. But if the activity is already deactivated (Field data is NO), is there a way to hide the record button DETAILS? Quote Link to comment Share on other sites More sharing options...
Ilyrian Posted March 30, 2023 Report Share Posted March 30, 2023 Hi @bookish The forum post below is to hide the delete button. You could use the same approach by modifying it, for example instead of InlineDelete you could use DetailsLink. You can then change the condition according to your needs. bookish 1 Quote Link to comment Share on other sites More sharing options...
bookish Posted March 30, 2023 Author Report Share Posted March 30, 2023 It did not work, I must be doing something here: <script> var condition = ("[@field:Schedules_ACTIVE^]" == 'N'); //Your condition /*Edits are not necessary from this point onward */ var deleteButtons = document.querySelectorAll('[data-cb-name="DetailsLink"]'); if(condition) { deleteButtons.forEach(function (elem) { elem.style.display = "none"; }); } </script> Quote Link to comment Share on other sites More sharing options...
bookish Posted March 30, 2023 Author Report Share Posted March 30, 2023 The per-record implementation tip of @DefinitelyNot31337did work! Thank you so much @Ilyrianfor the reference! Ilyrian 1 Quote Link to comment Share on other sites More sharing options...
cheonsa Posted January 28 Report Share Posted January 28 Hi! I just wanted to share with you this article from Caspio on how to disable the Inline Edit option based on a condition: https://howto.caspio.com/tech-tips-and-articles/disabling-inline-edit-option-in-reports-based-on-a-condition/ Quote Link to comment Share on other sites More sharing options...
Kurumi Posted June 25 Report Share Posted June 25 Hi! If you would like to apply this article: https://howto.caspio.com/tech-tips-and-articles/disabling-inline-edit-option-in-reports-based-on-a-condition/ when Data Grouping is enabled. You can change the code from const calculatedFieldPosition = 1 to const calculatedFieldPosition = 2 Make sure that the Calculated Field (formula/condition) is in 2nd place of the DataPage Elements and the first is the field for Grouping. Sample Result: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.