Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is the meaning of this formula?

Status
Not open for further replies.

robercr12

Programmer
Aug 11, 2009
75
0
0
US
hi,

I have a report developed by a previous developer - can you tell me what it means?

if isnull({view.field 1) or {view.field 1}=" "
then left({view.field 2}, 10) else {view.field 1}

what does this mean?? ---> left({view.field 2}, 10)

especially
left ?
and
,10

Thanks
bob
 

Hi,
[tt]
if {view.field 1} is null or {view.field 1} equals SPACE

if isnull({view.field 1) or {view.field 1}=" "

then return the left 10 characters of {view.field 1}
else return {view.field 1}

then left({view.field 2}, 10) else {view.field 1}
[/tt]

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hi,
I am sure SkipVought meant

then return the left 10 characters of {view.field 2 }







[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 


Ahhh, Turkbear: Great mindreader!

SkipVought: Great intentions. Terrible results!

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
The previous reporting guy made a mistake he should have used

then return the left 10 characters of {view.field 1 }

Thanks Guys -- i just had to make sure i understood it correctly

Regards
bob
 


The previous reporting guy made a mistake he should have used

then return the left 10 characters of {view.field [red]1[/red] }

So who's the swamie now??? ;-)

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
No, the original formula is correct, referencing left(field2,10). If the field1 is null or = " " then the left function becomes irrelevant for field1.

-LB
 
Lbass,

what do you mean by left function ?

so you are saying that the following assessment of the formula is incorrect?

if {view.field 1} is null or {view.field 1} equals SPACE
if isnull({view.field 1) or {view.field 1}=" "

then return the left 10 characters of {view.field 1}
else return {view.field 1}
then left({view.field 2}, 10) else {view.field 1}
 



What he's saying is that if {view.field 1} is null or just has a SPACE, then WHY would you return ANYTHING from {view.field 1}??

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
if isnull({view.field 1) or
{view.field 1}=" " then
left({view.field 2}, 10) else
{view.field 1}

This (correct) formula says that if field1 is null or holds only a space, then show the 10 first (left) characters of field2; otherwise, show field1.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top