Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am using the GetCurrentField(goupname) in the general tab under chart title.
This works fine apart from the group name that it is pulling is made up of an expression (ie =Left([Car sales.first name],1) & .....).
Is there a way I change this expression name to 'Sales Person'? Changing the label name under group setting only works for the cyclic logo and not the chart title name.
Suggestions welcome. Thanks.
My bad:
If(GetCurrentField ([activity group]) = '=left ([Sales_Sales.First Name],1) & ' & Chr(39) &'.'& Chr(39) & ' & [Car_Sales.Last Name]', 'Sales Person', GetCurrentField([activity group]))
Try this:
If(GetCurrentField(GroupName) = '=Left([Car sales.first name],1) & .....)', Car Sales, GetCurrentField(GroupName))
If(GetCurrentField(GroupName) = '=Left([Car sales.first name],1) & .....)', 'Sales Person', GetCurrentField(GroupName))
Make sure you have the exact expression, including the spaces and commas, within the two single quotes.
HTH
Best,
Sunny
can you please share the sample data or QVW ..it will give us a better idea what exactly your looking for??
OR you can explain with an example
Hey Sunny,
Thanks for the note.
I have put this into the title in chart box and get error in expression.
=IfGetCurrentField ([activity group]) = '=left ([Sales_Sales.First Name],1) & '. ' & [Car_Sales.Last Name]', Car Sales, GetCurrentField([activity group])
Does Car Sales need to be in single quotes? As the chart title should show 'Sales Person'.
Continuing on from this, do I repeat this for the second field in my group?
Yes it does. I did make the change in my above comment.
If(GetCurrentField ([activity group]) = '=left ([Sales_Sales.First Name],1) & '. ' & [Car_Sales.Last Name]', 'Sales Person', GetCurrentField([activity group]))
And yes repeat this for all your calculated fields.
Hi Avinash.
I have a cyclic group with two fields. The two fields within this group both have expressions in them so when I use the getcurrentfields(groupname) in the Title Chart on the general tab, its pulls the expression from the 'used field'.
This expression then sits above the chart and is not very user friendly.
I want to be able to change the name under the 'used field' to represent something easy to read.
You can give the expression a label in the Document Properties | Groups tab. Select the Group, Click Edit..., select the calculated field (in Used Fields) and enter a label in the Label box.
Hi Sunny,
Thanks Ive 95% got the answer here.
I still get an error as I've already used single quotes in my group expression to be used within the IF function. See highlighted in red below and so when I use the single quotes I still get this error. How do I get around this?
If(GetCurrentField ([activity group]) = '=left ([Sales_Sales.First Name],1) & '. ' & [Car_Sales.Last Name]', 'Sales Person', GetCurrentField([activity group]))
Your formula works perfectly for the other field in my group (and its has no single quotes in the original expression!)
Try this:
If(GetCurrentField ([activity group]) = '=left ([Sales_Sales.First Name],1) & ' & Chr(39) &.& Chr(39) & ' & [Car_Sales.Last Name]', 'Sales Person', GetCurrentField([activity group]))
Chr(39) = Single Quote