Forum Discussion

FaustoLiceaga's avatar
FaustoLiceaga
Qrew Trainee
2 months ago
Solved

Prevent save a record - New forms

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. 

  • 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.") 

     

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

  • 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?

  • 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.

  • 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.

  • 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. 

     

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

     

    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

      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.")