FORMAT ISSUE

LambaLamba Member Posts: 260
edited 2012-01-30 in NAV Three Tier
Hi Experts,


In a form, there are two fields having the same SourceExpr. One is showing date only and the
othere is showing only the Day(Eg: Monday Tuesday.....Sunday).

On creating its page the Day(Eg: Monday Tuesday.....Sunday) are not coming exactly. Its showing the date same as the
Previous and its obvious(as both are having the same source expr).

The difference i found was that the Day(Eg: Monday Tuesday.....Sunday) field
is having a Format property as <Week day>.

I tried multiple options as below:

FORMAT(<Source Expr of Day(Eg: Monday Tuesday.....Sunday)>,0,1)
FORMAT(<Source Expr of Day(Eg: Monday Tuesday.....Sunday)>,0,2)
FORMAT(<Source Expr of Day(Eg: Monday Tuesday.....Sunday)>,0,3).....

I am not getting the correct format/you can say i am asking what is the exact format of the expression
which is frequently used. So please tell me the exact meaning of the format's parameter, and in my case
what expression should be used to get the exact value, ie.; (Eg: Monday Tuesday.....Sunday).

Answers

  • EgnazEgnaz Member Posts: 111
    Hi,

    have you tried the FORMAT <Weekday Text> ?

    This works fine for me.

    Greetz
    egnaz
  • LambaLamba Member Posts: 260
    Hi Egnaz,

    This isn't working fine in my case i wrote in SourceExpr as

    FORMAT("X",0,<Weekday Text>);
    FORMAT(<Weekday Text>);

    The two of the format's are not working.
  • EgnazEgnaz Member Posts: 111
    Just build a small demo.
    I assign the value to a new Text variable in the OnAfterGetRecord

    Regards
    egnaz
  • kinekine Member Posts: 12,562
    Lamba wrote:
    Hi Egnaz,

    This isn't working fine in my case i wrote in SourceExpr as

    FORMAT("X",0,<Weekday Text>);
    FORMAT(<Weekday Text>);

    The two of the format's are not working.

    third parameter must be a string. Add ' ' around it... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • LambaLamba Member Posts: 260
    Thanx Egnaz...

    This one worked for me. \:D/
Sign In or Register to comment.