Discussions

Expand all | Collapse all

Formula Help

  • 1.  Formula Help

    Posted 06-12-2020 12:31
    I have an existing formula below that needs tweaking. I want the first conditions in bold to display "Ineligible" if the criteria is not met along with the other conditions. For example, If Are you a resident = No, then the field should display "Ineligible" regardless if any other criteria is met, same case with Age.



    If(
    [Are you a Resident?] = "Yes"
    and
    [Age] >= 18 and

    [Total Number of Members in the Household] = 1 and [Total monthly income for the household for past 30 days (Net income/Take home pay)?] > 1329.17 and
    [Total monthly income for the household for past 30 days (Net income/Take home pay)?]<= 4529.17, "Eligible",
    [Total Number of Members in the Household] = 1 and [Total monthly income for the household for past 30 days (Net income/Take home pay)?]> 4529.17, "Ineligible")

    ------------------------------
    Ermias Bean
    ------------------------------


  • 2.  RE: Formula Help

    Posted 06-12-2020 12:41
    try this

    If(
    [Are you a Resident?] = "No", "Ineligible",
    [Age] < 18, "Ineligible",

    [Total Number of Members in the Household] = 1 and [Total monthly income for the household for past 30 days (Net income/Take home pay)?] > 1329.17 and
    [Total monthly income for the household for past 30 days (Net income/Take home pay)?]<= 4529.17, "Eligible",
    [Total Number of Members in the Household] = 1 and [Total monthly income for the household for past 30 days (Net income/Take home pay)?]> 4529.17, "Ineligible")

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Formula Help

    Posted 06-12-2020 12:56
    A little cleaner approach would be:

    If(
    [Are you a Resident?] = "No" or
    [Age] < 18, "Ineligible",

    [Total Number of Members in the Household] = 1 and [Total monthly income for the household for past 30 days (Net income/Take home pay)?] > 1329.17 and
    [Total monthly income for the household for past 30 days (Net income/Take home pay)?]<= 4529.17, "Eligible",
    [Total Number of Members in the Household] = 1 and [Total monthly income for the household for past 30 days (Net income/Take home pay)?]> 4529.17, "Ineligible")


    ------------------------------
    Paul Peterson
    ------------------------------



  • 4.  RE: Formula Help

    Posted 06-12-2020 13:18
    Here's a simplified formula:

    var bool residentEligible = [Are you a Resident?] = "Yes" AND [Age] >= 18;
    var bool singleMemberHousehold = [Total Number of Members in the Household] = 1;
    var bool payEligible = [Total monthly income for the household for past 30 days (Net income/Take home pay)?] > 1329.17 and [Total monthly income for the household for past 30 days (Net income/Take home pay)?]<= 4529.17;

    var text eligibile = ($residentEligible && singleMemberHousehold) && $payEligible;

    if ($eligibile, "Eligible", "Ineligible")

    ------------------------------
    Neil Schneider
    ------------------------------



  • 5.  RE: Formula Help

    Posted 06-12-2020 14:08
    There's an error in the formula, should be:
    var bool residentEligible = [Are you a Resident?] = "Yes" AND [Age] >= 18;
    var bool singleMemberHousehold = [Total Number of Members in the Household] = 1;
    var bool payEligible = [Total monthly income for the household for past 30 days (Net income/Take home pay)?] > 1329.17 and
    [Total monthly income for the household for past 30 days (Net income/Take home pay)?]<= 4529.17;

    var bool eligibile = ($residentEligible && singleMemberHousehold) && $payEligible;

    if ($eligibile, "Eligible", "Ineligible")

    ------------------------------
    Neil Schneider
    ------------------------------



  • 6.  RE: Formula Help

    Posted 29 days ago
    Final edit - sorry used wrong syntax for 'AND"...
    var bool residentEligible = [Are you a Resident?] = "Yes" and [Age] >= 18;
    var bool singleMemberHousehold = [Total Number of Members in the Household] = 1;
    var bool payEligible = [Total monthly income for the household for past 30 days (Net income/Take home pay)?] > 1329.17 and
    [Total monthly income for the household for past 30 days (Net income/Take home pay)?]<= 4529.17;

    var bool eligibile = ($residentEligible and singleMemberHousehold) and $payEligible;

    if ($eligibile, "Eligible", "Ineligible")

    ------------------------------
    Neil Schneider
    ------------------------------