Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to populate a chart based on whose y values are Counts as the expression below suggests.
count({1<System={$(vShowSystem)}>} Component).Here System and Components are fields
vShowSystem is a variable which has a system based on the selection made in the system Listbox.It has only one value.
I am able to get the value in the Variable but me chart is not showing me any data.
But,instead of this if I give some defined value.Something like this,
count({1<System={"ACOM"}>} Component) I am getting the correct values.Please let me know the mistake I am commiting
Regards
Navin Gorapalli
Hi,
If you include the expression in the chart:
=$(vShowSystem)
do you get the result you expect?
since vShowSystem can only have one value, maybe you just need to include the ' '
count({1<System={'$(vShowSystem)'}>} Component)
Or you can write the expression directly on the set analysis:
count({1<System={'$(=only(FIELDwithSELECTION)'}>} Component)
Hope this helps,
Erich
Hi,
Try this expression
count({<System= {$(=GetFieldSelections(System))}>}Component)
Hope this will help you.
If not then please do specify how you are getting value in variable.
Specify the expression used for variable.
Regards,
Kaushik Solanki
Hi,
I am getting the variable value from the selection made on system.
I have set the variable value to=GetFieldSelections(System).
I have tried thw way you suggested but with no result.
Please let me know the right way.
Regards
Navin Gorapalli
Hi,
The problem with GetFieldSelection is that, if you select All values it will show you ALL, instead of list of all values.
Thus it is not working.
So use below macro to set the variable, with selected field values.
Sub GetValues
set val=ActiveDocument.Fields("Year").GetPossibleValues
set Var = ActiveDocument.GetVariable("Variable")
for i=0 to val.Count-1
if abc = "" then
abc = val.Item(i).Text
else
abc =abc &","&val.Item(i).Text
End if
next
Var.setcontent abc, true
end sub
and use this expression in your chart.
count({<Year = {$(#Variable)}>}1)
Regards,
Kaushik Solanki
Hi,
I have followed whatever you have said and I am getting the value in the variable but
the chart still shows the same thing 'No Data to Display'
Any other Possible WorkAround.
Regards
Navin Gorapalli
Hi,
If you include the expression in the chart:
=$(vShowSystem)
do you get the result you expect?
since vShowSystem can only have one value, maybe you just need to include the ' '
count({1<System={'$(vShowSystem)'}>} Component)
Or you can write the expression directly on the set analysis:
count({1<System={'$(=only(FIELDwithSELECTION)'}>} Component)
Hope this helps,
Erich
Hi,
Thanks Guys Both of you were really helpful and I was able to sort out the issue.
Regards
Navin Gorapalli