Announcement

Collapse
No announcement yet.

If chekbox =1 then set curent date

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • If chekbox =1 then set curent date

    Hello i'm traing to set the curent datetime in a atribut when a checkbox is click.

    ifThenElse(var1=='1', var2=datetime\today());

    var1 is a boolean atribute.
    and var2 is a Data atribut theat is initial none and read only

    when i go in to the edit mod and clik on the checkbox and save in view mod i dont see the curent date it's still none

    Pls help

  • #2
    Hello
    Did you try ifThenElse(var1, var2=datetime\today());
    Job Offers and Requests

    Find Developer
    Find Customer

    Comment


    • #3
      Tex so so muci, theat don the job i was looking for !

      Can i asc for one mor problem i'm having?

      My boss whats to see how muci time it taks from dateA to dateB and to show theat in the table

      So i thinc i need to mache a new varchare readonly null and se a formula like
      ifThenElse(dateA!=0&&dateB!=0, var1=dateB-dateA);
      or somfing like this

      Comment


      • #4
        ifThenElse(dateA && dateB, datetime\diff(dateA, dateB, INTERVAL_TYPE)
        https://www.espocrm.com/documentatio...t-datetimediff
        Job Offers and Requests

        Find Developer
        Find Customer

        Comment


        • #5
          ifThenElse(createdAt && dataLivrarii, timp=datetime\diff(dataLivrarii, createdAt, minutes));

          timp is Tip: DataTimp
          i put minutes so i can test it but i will use days

          createdAt && dataLivrarii are Tip: DataTimp

          it dosent worck i thing i need a difrent declaration for the timp atribut.....


          Comment


          • #6
            'minutes' in quotes
            it returns integer value
            Job Offers and Requests

            Find Developer
            Find Customer

            Comment


            • #7
              I dont undestend whai when i tick the box the time says today but in the fiucer from 1:30 pm the curent time to the 3.00 pm alweis
              And the difrence betwin the 2 date it dosen sem to show up aniting seens it's in the fucer

              Comment


              • #8
                datetime\today() returns date (time set as 00, but you have timezone +3, so you see 03:00)
                if you need dateTime - use datetime\now()
                Job Offers and Requests

                Find Developer
                Find Customer

                Comment


                • #9
                  Thet fix it
                  Silli my didant see datetime\today()

                  but still the other formula
                  ifThenElse(createdAt && dataLivrarii, timp=datetime\diff(dataLivrarii, createdAt, 'minutes'));
                  timp it still donsent return aniting

                  Comment


                  • #10
                    Did you try this?
                    ifThenElse(livrata, timp=datetime\diff(dataLivrarii, createdAt, 'minutes'));
                    Job Offers and Requests

                    Find Developer
                    Find Customer

                    Comment


                    • #11
                      Text problem solvd !

                      Comment

                      Working...
                      X