Forum Discussion

JasonZeller's avatar
JasonZeller
Qrew Trainee
10 months ago

Trouble with more complex interactions

Old dog learning new tricks here.  Long time .NET guy transitioning to QB...

I have a form that needs to have (on edit and add):

  1. An initial selection in the first field
  2. Several fields auto-populate based on the first field
  3. A subset of the auto-populated fields need to be editable.  This needs to happen when the initial selection field is changed

Example scenario:

I have used lookup fields and form values to attempt to accomplish this.  I can accomplish #1 and #2, but #3 does not work.  Either the auto-populated values change with the selection of the initial value but cannot be updated (they revert to the original value), or the form rules allow for auto-populating the values and editing, but this can only happen once.  If the  user changes the initial value for a second time, the first selection auto-populated values remain.

Also, I know there are probably ways to do this by bouncing between several pages, but we are re-working an existing app and the desired approach is to keep it as much of a "one-pager" as possible.

I have added an attachment that maybe makes the above clearer???

Thanks in advance for any advice y'all can provide.



------------------------------
Jason Zeller
------------------------------

5 Replies

  • Can you describe the form rule you're using for #3? I've come across the same issue where I wanted to autopopulate a field but allow it to be changed and it kept reverting to the initial value, and I resolved it by writing the form rule like this:

    If [Field 1] = X and [Field 2] is blank, change [Field 2] to Y

    That should allow you to change the value of Field 2 after it's been updated to Y, since at that point it's not blank so the form rule doesn't apply anymore.

    Does that answer your question?



    ------------------------------
    Ahuva Brown
    ------------------------------
    • JasonZeller's avatar
      JasonZeller
      Qrew Trainee

      This is a good thought and works for certain situations.  If I choose "Item A", it populates the default clause for Item A.  Then if I want to change the clause, it lets me and I can save the revised version, etc.

      However, if for any reason I need to pick another item, the clause does not update when it should.  Following the example above, if now the customer requests Item B, I am still left with the revised clause for Item A.



      ------------------------------
      Jason Zeller
      ------------------------------
  • I believe I understand your roadblock, and the fundamental problem is that the form needs to know when to fire the Form Rules to refresh the editable field with the value from the lookup.  

    Would you consider adding a radio button multiple-choice field onto the form where  the user chooses to use either the Standard Clause or Override Clause.  

    That can give more flexibility to your form rules, because if they select to use the Standard Clause, then the field would be non-editable, and would always be a mirror of the look up field ( ie maintained by form rules). But as soon as they do override, then the field becomes editable at that point. 



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------

    • JasonZeller's avatar
      JasonZeller
      Qrew Trainee

      Not ideal, but this might be the best available option.  It's kind of foreign to me that there is no "onChange" event or equivalent for the fields (unless I have just totally missed it)



      ------------------------------
      Jason Zeller
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        I am admittedly a little behind in my learning curve for new forms, but I know an old style forms you can trigger a rule based on when the record is saved, and a certain field changes.



        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------