Count items in a list

Hi,

I want to do something that seems simple, i have a list (Complaint list), and it has a field (text) called custRef which is not unique.

I am in another module and when a user enters a CustRef (text field) i want to then count how many times that appears in the Complaint list.

 

As the CustRef is not from a list, and just a text field I am a little stuck?

 

thanks

 

 

Tagged:

Best Answer

  • Egor
    Answer ✓

    Hi DeveloperCYT,

    Hope I understand you issue correctly - you have a text formatted property in a Complaint list called CustRef, and you want to see how often the value entered by user is found in this property.

    To do so please create a Comp Module that has Complaint list as dimension, it will have two line items:

    1. CustRef - text formatted - picks up value from CustRef property of the list
    2. Count CustRef - number formatted - formula: IF CustRef = Input Module.CustRef THEN 1 ELSE 0

    You will also have an Input Module with two line items:

    1. CustRef - text formatted - used for user input
    2. Count Occurrences - number formatted - formula: Comp Module.Count CustRef

    Your Complaint list must have a top level for this to work

    Best regards,

    Egor.

Answers