0

Help needed with Real-time data input and String search

Hello Pyramid Community,

I wanted help with 2 items:

1) I am working on building a pyramid dashboard which simulates pricing decision. For this simulation, I need to get real time input from the user for order quantity. Could someone suggest the best way to obtain the real time input on the dashboard? which can then tweak the results generated by the underlying data model

2) I am trying to determine if the customer is new or existing based on the real time input of the customer name. My logic is to compare the Text parameter input for name with the existing customer names in the model. But I'm facing challenges in implementing the same. Could you suggest the best way to do this?
E.g: I enter "Angela" as customer name - if this name is there in the existing list of customers, my dashboard should display "Existing Customer", otherwise "New Customer"
 

Will be very grateful if someone could help me with the above 2 challenges. 

10 replies

null
    • Senior Director of Product
    • Ian_Macdonald
    • 3 mths ago
    • Reported - view

    Hi 

    For the numeric input, simply use a numeric global parameter and then use that parameter in your formulate calculations.

    For the customer name, create a parameter containing all the customer names. Use that parameter on your dashboard slide and use it in your queries. The visual parameter object has search capabilities to select the customer, you don't need a free text input to enter the name and then compare it to the customer members.

    You can set the search type in the settings

    Hope that helps.

    Ian

    • Sanjeeth_Baliga
    • 2 mths ago
    • Reported - view

    Hi

    Thank you so much for the prompt reply and help. The solution to the first item is very helpful.

    I am looking for a different kind of functionality with respect to the second item. Let me explain in more detail:
    I want to be able to input a customer's name, check if the customer is new or old (by comparing them against the existing list of customers) and take some action based on this logical expression. If the customer is existing, I follow course A: give X% discount on list price; if the customer is new, course B: give Y% discount on list price. 
    I hope I have explained my problem statement better. Can this be done on Formulate using 'if' or any other functions? I faced challenges in using string functions.

    Kindly let me know if you have a suggestion for implementing this. Again, Thanks a lot for your help.

    Regards

      • Customer Solutions Architect
      • Moshe_Yossef
      • 2 mths ago
      • Reported - view

       

      I know this may seem simplistic, but if you put the customer attribute in a filter, open the filter and search "Angela", won't you get exactly what you're asking for?

      I'm not sure how filter search works on attributes with a lot of members though.

      I have another idea, will write next week.

      • Senior Director of Product
      • Ian_Macdonald
      • 2 mths ago
      • Reported - view

       I think that was what I suggested above!

      Ian

    • Senior Director of Product
    • Ian_Macdonald
    • 2 mths ago
    • Reported - view

    OK, this is a bit more complicated.

    Everything in Pyramid is driven by queries, there is no direct link between entering a text string and testing it against data, we have to go via queries. Here's how I solved your problem.

    1. Create a global text parameter with free input - Customer Name
    2. Create a global numeric parameter with free input - Factor
    3. Create a dynamic list of customer names filtered by the text parameter. You can choose how the text string is compared. This will result in a list of customers what match the condition, or an empty list if there are no matches. Note where the list is located, in the customer name hierarchy.

    3. Create a measure "Exists" that counts the number of items in the list and returns "True" if there are more than zero entries, or "New" if it is an empty list

    4. Create a new Measure (This will be your applied discount) by multiplying the base Measure (Sales in my case) by the global numeric parameter, Factor, if Exists value is "True", or a scaled Factor if it is "New".

    5. Create your query for the base and factored base values

    6. Add the Parameters and Query to your dashboard and make sure the parameters interact with the grid (or chart or whatever) and are connected to the parameters driving the grid.

    7. Create a simple query that just shows the value of the Measure, Exists. This can then be used to read off the customer status using dynamic text to display to the user if the customer exists or is new. Make sure the customer name parameter interacts with the dynamic text.

    8. At run time you can see that if we enter text that doesn't match any customer, then the discount factor is changed and the dynamic text says New.

    Hope that Helps
    Ian

      • Sanjeeth_Baliga
      • 2 mths ago
      • Reported - view

       

      Hi Ian,

      Thank you so much for the detailed response and solution to the query. This really helped. I'm close to achieving my intended visualization. However, I'm facing yet another challenge. I'd be grateful if you could help with that as well.

      With respect to choosing an action based on whether the entered customer name is existing or new customer, I want to be able to display certain details of the specific customer taken as input.

      For eg, if the user inputs customer name as "abc" and this customer is an existing customer, I want to display the Sales amount measure specific to this customer. However, when I tried doing this, The visual in dashboard displayed the aggregated Sales amount across all customers. This happened inspite of adding a connection between the customer name parameter and the grid for displaying the sales amount. 

      Second, if the customer is new, is it possible to turn off the impact of the customer name slicer and use the other required slicers for displaying details?
      Thanks in advance.

    • Senior Director of Product
    • Ian_Macdonald
    • 2 mths ago
    • Reported - view

    Hi 

    The first part is simple, just create a grid with customer name on the rows and choose to display the filtered customer name list. Then add whatever other attributes and measures you want.

    I don't understand the second part, as if the entered name is not a customer, what details would you hold?

    Ian

      • Sanjeeth_Baliga
      • 2 mths ago
      • Reported - view

      Hi  ,

      Thanks for the solution to the first part. The solution was what I had expected to achieve. 

      Adding more details for the second part. So, in case my customer is an existing customer I want to display a measure "Recommended Sales Price". In case my customer is new, I want to display a different measure "List Price". Is it possible to dynamically change the measure being displayed based on whether the customer is new or existing? Or is there a workaround to this? Hope you understood my problem.

      Thanks gain.

    • Senior Director of Product
    • Ian_Macdonald
    • 2 mths ago
    • Reported - view

    Hi 

    I'm still confused.

    So your user has entered a customer name that does not exist in the data. Obviously the grid will show "Not enough information" as there are no customers in the filtered list. So it doesn't matter what measure you choose, nothing will appear.

    Are you in some way wanting to add the name entered into the database?

    Pyramid does not support write back into  a database in this way.

    The only way, potentially to do that would be to write some kind of data entry form in JavaScript on a web page that performed this action and have that web page displayed conditionally based on if the customer is new or not. This can be done using mini-tabs. But again, the data entry would need to be a web page built outside Pyramid.

    Hope that helps,

    Ian

      • Sanjeeth_Baliga
      • 2 mths ago
      • Reported - view

      This helps, Thanks a lot!

Content aside

  • Status Answered
  • 2 mths agoLast active
  • 10Replies
  • 80Views
  • 3 Following