on 05-10-2008 11:37 AM
Post Author: Stuart
CA Forum: Formula
Dear All, I have been creating some useful reports in crystal but I can't seem to work out how to do the following. I need a statement that can do two things, If data in field 1 is equal to "100100" and data in field 2 begins with Name1 then rename "Name1" to "Name2". Essentially my data has long names and I just want to be able to group in certain ways. The above will really help me achieve this. I have tried a formula to do this but I was unsuccessful. Hope someone can assist, Many thanks, Stuart
Post Author: Stuart
CA Forum: Formula
This worked great
Many thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: amr_foci
CA Forum: Formula
if({Tab.NAME} like "Name1" ) then "GroupA" else
if({Tab.NAME} like "Name2" ) then "GroupB" else
if({Tab.NAME} like "Name3" ) then "GroupC" else if({Tab.NAME} like "Name4" ) then "GroupD" else {Tab.NAME}
its "else" not "or"
good luck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: Stuart
CA Forum: Formula
Hi
I am trying to amend your forumla to get this working;
if({Tab.NAME} like "Name1" ) then "GroupA" or if({Tab.NAME} like "Name2" ) then "GroupB" or if({Tab.NAME} like "Name3" ) then "GroupC" or if({Tab.NAME} like "Name4" ) then "GroupD" orelse {Tab.NAME}
I get the error "A boolean is required"
Hope you can help.
Also how can I manipulate the above code to enter the "GroupA" in a completely seperate field and leave the data in NAME the same. I could then use thiis new field to group.
Many thanks,
Stuart
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: Stuart
CA Forum: Formula
Hi
I am trying to amend your forumla to get this working;
if({Tab.NAME} like "Name1" ) then "GroupA" or if({Tab.NAME} like "Name2" ) then "GroupB" or if({Tab.NAME} like "Name3" ) then "GroupC" or if({Tab.NAME} like "Name4" ) then "GroupD" orelse {Tab.NAME}
I get the error "A boolean is required"
Hope you can help.
Also how can I manipulate the above code to enter the "GroupA" in a completely seperate field and leave the data in NAME the same. I could then use thiis new field to group.
Many thanks,
Stuart
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: Stuart
CA Forum: Formula
Thanks to both of you,
I'll give this a try.
Much appreciated,
Stuart
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: amr_foci
CA Forum: Formula
this is may wat you want
if({TAB.FIELD1}=100100 and {TAB.NAME} like "text" ) then"text"else {TAB.NAME}
you can replace this "text" with any other values like {TAB.NAME2} , and you can check the help for "like" operator
good luck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: amr_foci
CA Forum: Formula
if({TAB.FIELD1}=100100 and InStr ({TAB.NAME},"text" )=1 ) then"text"else {TAB.NAME}
try this, and i will find out any other solution
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.