Skip to main content
sivasuryap0002
Known Participant
Oct 11, 2021 6:22 PM UTC
Question

new

Hi All,

I am getting this error, "Interface Definition: Expression evaluation error at function a!dateField: Cannot compare incompatible operands of type CS_Vehicle and type Date with Timezone."

here is my code,


a!dateField(
label: "Date of Manufacturing :",
required: true(),
value: local!manDate,
saveInto: {local!manDate,a!save(ri!Vehicle.ManufacturingDate,save!value)},
helpTooltip: "It will be present on the Registartion details",
validations: if(
local!manDate >= today(),
"Manufacuted date should not be Today or Future",
{}
)
)

Thanks In  Advance.

    2 replies

    mikes0011
    Brainy
    Oct 11, 2021 6:27 PM UTC

    The code you've posted looks OK as far as I can tell.  Just for troubleshooting purposes, you should comment out the a!save() statement that interfaces with "ri!Vehicle" and see if the same sort of error persists.  Any subsequent troubleshooting suggestions would hinge on how this behaves.

    As a side note, your example here is short enough to just paste as text without issues, but if you'd use a Code Box instead you'd be able to post the code with indentation preserved, which makes it a lot more readable.

    a!dateField(
      label: "Date of Manufacturing :",
      required: true(),
      value: local!manDate,
      saveInto: {
        local!manDate,
        /*a!save(ri!Vehicle.ManufacturingDate,save!value)*/
      },
      helpTooltip: "It will be present on the Registartion details",
      validations: if(
        local!manDate >= today(),
        "Manufacuted date should not be Today or Future",
        {}
      )
    )

    The Expression Guru
    sivasuryap0002
    Known Participant
    Oct 12, 2021 3:37 PM UTC

    Thanks [mention:b45a4f6a20b14a008e4e0ec732a8bf98:e9ed411860ed4f2ba0265705b8793d05],

    That Helped a lot.