Formula to count the number of quotes associated to an opportunity

Hello, I am hoping someone can help me with a Studio formula question. I want to count the number of quotes attached to an opportunity by the different quote statuses. I found 2 different formulas (one from the Sugar Club forum and the other in the Sugar documentation) but neither will count my quotes. The first formula uses “countconditional” and it does not pull back any results. I tried to use this formula on different modules (Meeting, Calls and Tasks) but the result is always the same no result. The next formula is an “ifelse count” formula, it will count the records in the Calls, Meeting and Task modules but not the Quote module. Can a count be done against the Quote module? If so, do either of these formulas need to be updated to count the quotes? I am testing in 12.3.

My  Count Quote 1 should total 3 and the Count Quote 2 should total 7 if the quotes were being counted.

Parents
  • Hi ,

    Your countConditional formula is on the right track for what you want to achieve. The minor correction to make is that the second parameter (field name) should be the system field name, not the display label. In other words, there should never be a space and the field name should be all lowercase letters. Your formula should look something like this:

    countConditional($quotes,"quote_stage",createList("Draft"))

    If you are unsure of what the system field name is, go to Admin > Studio > Quotes > Fields and find the 'Quote Status' field in the listing. The system field name will be in the first column.

    Chris

Reply
  • Hi ,

    Your countConditional formula is on the right track for what you want to achieve. The minor correction to make is that the second parameter (field name) should be the system field name, not the display label. In other words, there should never be a space and the field name should be all lowercase letters. Your formula should look something like this:

    countConditional($quotes,"quote_stage",createList("Draft"))

    If you are unsure of what the system field name is, go to Admin > Studio > Quotes > Fields and find the 'Quote Status' field in the listing. The system field name will be in the first column.

    Chris

Children