Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need help to understand what is going wrong with my syntax of getfield used in conjunction with set analysis
I am trying count the number of tickets when the user selects the field in the list box titled 'Ticket Type'. I have used the below syntax but it shows an error in the set modifier when i type the below. I am not able to understand what is going wrong with it Can somebody please help me?
count(distinct {<Ticket_Type = {=getfieldselection(Ticket_Type)}Incident>})
Try: count({<Ticket_Type = {"$(=getfieldselection(Ticket_Type))"} >} distinct Incident)
- Marcus
I don't think you need any set analysis here: Have you tried this?
Count(DISTINCT Incident)
Try: count({<Ticket_Type = {"$(=getfieldselection(Ticket_Type))"} >} distinct Incident)
- Marcus
I need to calculate basis the value selected in the listbox. so when the value is Alerts then the count needs to be updated
When i put ' " ' i.e double quotes the gefieldselection does not appear in blue it appear as a text and not as predefined formula..
count(distinct {<Ticket_Type = {"$(=getfieldselections(Ticket_Type))"}>} Incident)
The double-quotes surrounding an expression within a set analysis are mandatory to be calculated and yes they won't be regognized as an expression from syntax checker then they won't be considered as a nested function inside from another function then this part is mainly a dataset (even if the result comes from an expression).
Update: and have a look on the red chars in Treseco's answer.
- Marcus
I believe Sunny is right here, or we are missing something else:
=Count(DISTINCT Incident)
should already consider user selections in TicketType. Or if you want to check if there is a single selection:
=If( GetSelectedCount( TicketType)= 1, Count(DISTINCT Incident) )
This is what happens when i use quotes..it all appears in red
this
count({<Ticket_Type = {"=getfieldselections(Ticket_Type)"} >} distinct Incident)