Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have attached a QVF file.
I Have a table with customers and count of employee id corresponding to those customers.
I have created a variable named max_date which basically calculate the maximum date from date field.
when the app is opened for the very first time then the data is displayed w.r.t. the max date i.e. Dec i.e nothing is selected from the date filter.
My requirement is that when the app is opened and data is displayed corresponding to max date i.e. December then my text color should be black.
when I select any date from date filter then my text color should changed as follows:
If current count of emplid > previous selected date count of emplid then Red.
If current count of emplid > previous selected date count of emplid then green.
Problem I m facing while using the expression I have created i.e.
if(GetSelectedCount(reportdate)=0,black(),
if(GetSelectedCount(reportdate)=1, if(count({$}Empid) > Count({$1}Empid),red(),Green() ))
)
is on first selection of date from date filter the current count of emplid is compared with the total count of all the dates and give color accordingly which is wrong.
For eg. if for first time I select October then count corresponding to October is being compared with the count of Dec, Nov, Oct.
What is want is that when on first selection I select October then the October count should be compared with max date i.e. max_date variable data and on next selection the current filter selection count should be compared with the previous selected filter date and should give colors accordingly.
Kindly Help.
Thanks In advance.
Sorry to say but its still not working..
Have you checked the attached sample... I saw it working for me...
Since the colors are barely noticeable, I have created a separate expression to show what color it should be showing...
When we open up
Next we select 10/31/2017
Next we select 11/30/2017
Also, added as a background color for better visibility
Yes, I have checked.
Its still comparing with total value.
The thing is that on the first selection all the numbers are reducing which are less in comparison to the total value that's why the color has changed to green.
Unfortunately there is no case where the number has increased upon first selection, else you would have come to know about the problem.
And also we are using Field UI extension with by default one selection at a time instead of filter pane.
hi Sunny
Your app is working fine with normal filter pane but not with field UI extension (used for always one selected value)
When I am selecting specific customers from pivot table the colors are not changing correctly
but without any selection of customer its working fine.
I don't have the extension, so I don't really know how it works. May be someone with the extension can help better
I think the problem is not with the expressions that I have been offering, the issue has to do with the extension.... If you will continue to attack the wrong problem, you will get no where. I think what you need to do is to check how does $1, $2 behave with your selection in the extension filter object. Once you are able to figure that part out, the expression's logic itself will stay the same....
Does that make sense?