• Resolved rlwnocable

    (@rlwnocable)


    Hello ,

    I’m trying to test on a timepicker field, if the time is after 17.00 jours.
    The formula i made is as follows:
    The field the formula is in is called “Efter 17”.

    var tid1 = (RNMinutesDiff($$field_rnField6$$.GetField(current,’rnmoedetid’),
    ? ? ? ? ? ? ? $$field_rnField6$$.GetField(current,’rnsluttid’)))/ 60;
    if($$field_rnField6$$.GetField(current,’rnmoedetid’).numericalvalue >= 61200000)
    return tid1;
    else
    return 0;

    But it only says “undefined” .
    What do i do wrong ?
    best regards
    Robert

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author EDGARROJAS

    (@edgarrojas)

    Hello!

    Could you send me an screenshot of the formula so i can see the name of the fields instead of only the ids please?

    Thread Starter rlwnocable

    (@rlwnocable)

    Hello
    did you get my mail with the screenshots ?

    Plugin Author EDGARROJAS

    (@edgarrojas)

    err no sorry, didn’t get it.

    Thread Starter rlwnocable

    (@rlwnocable)

    Oh, sorry .
    trying again :
    I can’t paste a screenshot in here,
    but the field names are :
    Moedetid (timepicker)
    Sluttid (timepicker)

    var tid1 = (RNMinutesDiff($$field_rnField6$$.GetField(current,’rnmoedetid’),
    ? ? ? ? ? ? ? $$field_rnField6$$.GetField(current,’rnsluttid’)))/ 60

    if(new time($$field_rnField6$$.GetField(current,’rnmoedetid’)>=61200000))
    return tid1;

    Thread Starter rlwnocable

    (@rlwnocable)

    Hello ,
    Did you get a chance to look at this ?
    Its the only thing i’m missing before setting the form into production ??
    best regards
    Robert

    Plugin Author EDGARROJAS

    (@edgarrojas)

    Oh i noticed something.

    Could you add this to the end of the formula please?

    return ”;

    Thread Starter rlwnocable

    (@rlwnocable)

    Hmmm, where schould i place the return “; ?

    var tid1 = (RNMinutesDiff($$field_rnField6$$.getfield(current,’rnmoedetid’,$$field_rnField6$$.getfield(current,’rnsluttid’))
    if (time($$field_rnField6$$.Getfield(current,’rnmoedetid’) >=61200000))
    return tid1;

    Plugin Author EDGARROJAS

    (@edgarrojas)

    at the end of the formula, i belive that should fix the undefined thing as you are not returning anything when the condition is not met. The return ” should fix it.

    Regards!

    Thread Starter rlwnocable

    (@rlwnocable)

    sorry to bother you , but i cannot get it to work .
    can i ask you to take a look at it again ?

    var tid1 = (RNMinutesDiff($$field_rnField6$$.GetField(current,’rnmoedetid’),
    ? ? ? ? ? ? ? $$field_rnField6$$.GetField(current,’rnsluttid’))) / 60;
    if (new Time ($$field_rnField6$$.Getfield(current,’rnmoedetid’)) >= 61200000)
    return tid1;
    Else
    return ”;

    Thanx a lot!

    Plugin Author EDGARROJAS

    (@edgarrojas)

    Probably the problem is that is else not Else, cases matter in the code. Also it is not needed, if you want you can remove it.

    If this doesn’t fix the problem, could you put this line at the very beginning of the formula?

    debugger;

    this will help me debug the formula to inspect what is the problem.

    Regards!

    Thread Starter rlwnocable

    (@rlwnocable)

    Arrghh. must be me that is stupid ??

    The formula is right now:

    var tid = RNMinutesDiff($$field_rnField6$$.GetField(current,’rnmoedetid’),
    $$field_rnField6$$.GetField(current,’rnsluttid’)) /60;

    if (new Time ($$field_rnField6$$.GetField(current,’rnmoedetid’)) >= 61200000)
    return tid;
    else
    return ”;

    But is just looping when i start up the page .
    tipform.nocable.dk/mjutidsreg

    Also when i place ‘Debugger;’ at the very beginning of the site.
    Cleared all caches both on the iste and the client.
    Can you login to the site ? I think you have the login and password already.
    Else send me an email in private on [email protected].
    Thanx a lot for your excellent support!
    Is there anywhere in the dokumentation, where you have the possibilities with conditions and formulas with timepickers?

    br
    Robert

    Plugin Author EDGARROJAS

    (@edgarrojas)

    OH sorry i can’t create tickets myself, could you contact me throw this form please? https://smartforms.rednao.com/contactme/

    Thread Starter rlwnocable

    (@rlwnocable)

    Hello,
    Thanx a lot !
    I got it to work ??

    Best regards
    Robert

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘testing on timepicker’ is closed to new replies.