Skip to Content
avatar image
Former Member

Problem with Mid Function

Hello,

i have in datebase index like this 60001000.  I am trying display it like this 6000 1000. I used mid function in formula:

if {PKL1.BaseObject}=17 then {MID({RDR1.ItemCode}, 1, 4); MID({RDR1.ItemCode}, 4); }

else {MID({INV1.ItemCode}, 1, 4); MID({INV1.ItemCode},4)} 

I have error that this field doesnt exist. When i remove mid function its display properly.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 29, 2015 at 10:17 AM

    Hi Krystian,

    Try:

    if {PKL1.BaseObject}=17 then

    MID({RDR1.ItemCode}, 1, 4) &' ' & MID({RDR1.ItemCode}, 4)

    else MID({INV1.ItemCode}, 1, 4) & ' ' & MID({INV1.ItemCode},4)

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded