Discussions

 View Only
  • 1.  Pop up Message when child is added and field on parent record changes

    Posted 19 days ago

    I have a situation where there are two tables and the parent table has two formula fields.  One counts the number of child records and when that number is 10 or above the other formula field changes from No to Yes. 

    What I need to when a user creates a new child record and the number of child records goes from 9 or below to 10 or above and the formula field on the parent record changes from No to Yes, I want a pop up to alert the user who created the child record.

    Not sure where I should start on this?  








    ------------------------------
    Carol Mcconnell
    ------------------------------


  • 2.  RE: Pop up Message when child is added and field on parent record changes
    Best Answer

    Posted 18 days ago

    Rather than a "pop up" what I suggest is to have a Rich Text formula field, which will show a message (perhaps large size font and red).,  You can lookup the current # of Children  and if it's already at 9 or above , then show a message in Add mode.  

    However, if you are adding children in Grid Edit mode, the "ask" becomes more difficult or perhaps not possible as the child record being added in Grid Edit mode do not get "counted" by the Summary Count field until they are saved.  But you can still have that big red message on the parent, but at that point the children will have already been created.



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



  • 3.  RE: Pop up Message when child is added and field on parent record changes

    Posted 13 days ago

    Thanks Mark, this worked. I appreciate the help.



    ------------------------------
    Carol Mcconnell
    ------------------------------



  • 4.  RE: Pop up Message when child is added and field on parent record changes

    Posted 18 days ago
    Edited by Brian Seymour 18 days ago

    Mark's suggestion is what came to mind for me too. Your parent table would summarize (count) the children. But then you'd pass that count back to the child table using a lookup field.

    Then once the child has info about it's siblings, you could give the User a heads up when that page is loaded, such as when the count is 9 or more via a Form Rule. Oftentimes, I'll wrap this into a helper formula checkbox for Form Rule readability. Something like:

    // Children::Should Show xyz Warning
    If (
        [Parent - # of Children] > 8,
        true,
    
        // Default to unchecked
        false
    )


    Then leverage that in your Form Rules to display a section with a "Text" Form Element where the HTML (Limited) box is checked. Or a maybe a Formula Rich Text field.

    I usually lean on Bootstrap's Alert component styling for this type of messaging.

    <p style="
        background-color: #cfe2ff;
        border-color: #b6d4fe;
        border-radius: .25rem;
        border: 1px solid transparent;
        color: #084298;
        font-size: 0.875rem;
        line-height: 1.4;
        margin-bottom: 1rem;
        padding: 1rem 1rem;">
        This is an <b>informational</b> message!
    </p>


    Hope that gives you some ideas!



    ------------------------------
    Brian Seymour
    ------------------------------



  • 5.  RE: Pop up Message when child is added and field on parent record changes

    Posted 13 days ago

    Thanks Brian.  I used your HTML and just change the colors.  



    ------------------------------
    Carol Mcconnell
    ------------------------------