Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Setanalysis with getfieldselection field issues

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>})

1 Solution

Accepted Solutions
marcus_sommer

Try: count({<Ticket_Type = {"$(=getfieldselection(Ticket_Type))"} >} distinct Incident)

- Marcus

View solution in original post

20 Replies
sunny_talwar

I don't think you need any set analysis here: Have you tried this?

Count(DISTINCT Incident)

marcus_sommer

Try: count({<Ticket_Type = {"$(=getfieldselection(Ticket_Type))"} >} distinct Incident)

- Marcus

Anonymous
Not applicable
Author

I need to calculate basis the value selected in the listbox. so when the value is Alerts then the count needs to be updated

Anonymous
Not applicable
Author

When i put ' " ' i.e double quotes the gefieldselection does not appear in blue it appear as a text and not as predefined formula..

tresesco
MVP
MVP

count(distinct {<Ticket_Type = {"$(=getfieldselections(Ticket_Type))"}>} Incident)

marcus_sommer

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

swuehl
MVP
MVP

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)  )

Anonymous
Not applicable
Author

This is what happens when i use quotes..it all appears in red

Kushal_Chawda

this

count({<Ticket_Type = {"=getfieldselections(Ticket_Type)"} >} distinct Incident)