[4.0.4.0] - Conditional Formula for Edit and Delete buttons - Forum - Rollbase - Progress Community

[4.0.4.0] - Conditional Formula for Edit and Delete buttons

 Forum

[4.0.4.0] - Conditional Formula for Edit and Delete buttons

This question is not answered

Hello,

I am using the Conditional Formula feature for an object record in order to control when the "Edit" and "Delete" buttons should be displayed. This object record is a related list for another main object. So the logic behind this is: If a related record is created, I am allow the editing option to be available for 10 minutes and then remove the edit button. Likewise, the same formula for the delete button. So this works fine if you refresh the page. However if you are on the same page and haven't refreshed the page for 10+ minutes and click on the edit button, the user is allowed to edit the record.

This shouldn't be the case and I think the conditional formula needs to be checked before the user is allowed to edit the related record. Ideally the edit button should disappear after 10 minutes if the page hasn't been refreshed but I don't know/think if live updating is currently possible in Rollbase.

This seems like a bug to me and would like to know if there is a possible fix for this.

Cheers.

Iram

All Replies
  • Hi,

    Conditional Formulas are executed only on a page load and accordingly the "edit"/"delete" functionality is disabled as per the return value of the formula. Dynamic hiding of edit/delete actions is not possible.

    You may have to write server-side validation (using the created-at/updated-at field values) if you need to achive this. Or may be a trigger of type "Validate Record Data" by checking if the updated-at value is more than 10 minutes later of the main record.

    Hope this helps.

    Regards,

    Harsha.

  • Hello Sri Harsha,

    So technically if the user doesn't reload the page for 10+ minutes and clicks on Edit, the user should be able to edit the record?

    In my opinion, I think the conditional formula needs to be checked again when the user clicks on the Edit/Delete button just to confirm if the user is allowed to perform that.

    Iram

  • Yes. User will be abel to edit/delete.

    Conditional Formulas are more for client-side. They are evaulated during the page load. Validation Trigger would be more ideal place to write such logic if any server side check is required.

  • Can we add a validation trigger for the use case above? If so, how can we go about doing that?

    Iram