Unable to set a custom date field

Created on 2 February 2023, over 1 year ago

Problem/Motivation

Hi there

I've been trying to use ECA to set field values on a custom entity. In my model, I use some logic to calculate the date I want to set, which all works fine until I try to set the custom date field. I can use the same method to successfully change default date fields, such as "created", but not the custom date field. I have created a simplified model, which I've attached, which attempts to set a custom date field on a basic page. I'm not sure if I'm doing something wrong or if it's a bug.

Thanks in advance for your help
Keiron

Steps to reproduce

Add a custom date field to an entity
Use "Entity: Set Field Value" to set the value of the custom date field
Result date isn't set, but if you have a message that tells you what the field value of the custom date field is, it returns the expected date. However, the value is lost and the field is empty after the process has run.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Fixed

Version

1.1

Component

Miscellaneous

Created by

πŸ‡¬πŸ‡§United Kingdom keiron

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @keiron
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Nice one, thanks @keiron for posting this together with your sample.

    The issue is a simple one: you're storing the timestamp into your custom field, but it requires the date in the format 2023-03-01T00:00:00. So, if you convert that with the pattern Y-m-d\TH:i:s it'll work.

    This is outside of ECA's control, what the required data format is for the various field types. The best way to figure it out is to store a field value through the interface and look into the database to see in which format it's being stored. Then you can easily replicate that.

  • πŸ‡¬πŸ‡§United Kingdom keiron

    Fantastic, thanks for the speedy response Jurgen! I'm glad it wasn't a bug and I'll know to look in the database for the format in the future.

    Keiron

  • Status changed to Fixed over 1 year ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Great, have fun with further ECA-modelling ;-)

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024