Skip to main content
Solved

Prevent save a record - New forms

  • December 26, 2024
  • 0 replies
  • 479 views

FaustoLiceaga
Forum|alt.badge.img+2

Hi, I was wondering if anyone can figure out how to avoid saving a record with duplicate attachments.
The scenario is as follows:  I have created a new version form and added three fields attach type. These are mandatory. 

In legacy forms, this works partially because as I only validate that the name is not identical between the attach type fields. But quickbase has no validation at the level of the attachment field content level. 

Thinking outside of the box I have implemented the following dynamic formula to avoid saving, when these attachments are duplicates. But when I implement this dynamic rule in the new version of the form. it doesn't work. 

Best answer by MarkShnierYou

Try making this as a formula text field  and then just use the field in the Custom Data Rules box.

IF(

[Evidence] =[Customer invoice] and [Evidence]<>""

or

[Evidence] =[Purchase order attach] and [Evidence]<>""

or

[Customer invoice] = [Purchase order attach] and [Customer invoice] <>"",

"Duplicate files not allowed.") 

 

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • December 26, 2024

I don't know if that kind of form rule based on file names in New Style forms is supported yet.  You would need to check with support.  But you could put in n a data table rule to look for that condition and block the save.  That is a setting in Advanced settings for the table. Basically you construct an error message to the user in a text formula and if that does not calculate to blank (null), then the record will not save.


FaustoLiceaga
Forum|alt.badge.img+2
  • Author
  • Quickbase Alumni
  • December 26, 2024

I contacted support before open discussion and 
they says me me this can't posible in the new version forms. And they suggested use this channel to found a way to implement this.


MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • December 26, 2024

Ok, so you can try"Custom Data Rules".  Look for it in Advanced Settings for the table.


FaustoLiceaga
Forum|alt.badge.img+2
  • Author
  • Quickbase Alumni
  • December 26, 2024

Sorry I don't comment the support team give me an answer about it... When I started this discussion.

wow! Really can I handle this with the dynamic table rule. Here's the implementation.

Is there anything you can suggest to handle and complete the formula for me.

I need evaluate between the 3 attachments, so basically I need to include the multiple combinations for the 3 attachments. 

 


MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • December 26, 2024

Ok, so before we build the Custom Data Rule, let's just make a regular formula text field to calculate the error message.  Are you saying that there are three fields for attachments and no two of them can be the same? Can you tell me the three field names?


FaustoLiceaga
Forum|alt.badge.img+2
  • Author
  • Quickbase Alumni
  • December 26, 2024

Actually, there cannot be any duplicate attachments. the name of fields are, Evidence, Customer invoice, Purchase order attach. 

 


FaustoLiceaga
Forum|alt.badge.img+2
  • Author
  • Quickbase Alumni
  • December 26, 2024

Thank you very much, for helping me to solve this.!!!