Clear a date formatted list property.

Hello everyone.

My case is simple : For a specific client need, I have a list with date property. Each time a date is input in the module, a process is run to "save" the input in the lists properties.

Some of these properties are date formatted line items.

When the client input a date and save it, the import sends the date from the module to the list property. But when he clear it in the module and then save, the line item "Date" of the list doesn't move.

I tried to add another process that specifically target this property with a "BLANK" date, but it doesn't work.

Anyone has an idea ? Is it a specificity of the date type ?

Thanks

Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Answers

    1. Do not load anything to list property, as it does not come under best practice; unless there is a reason to do so, then it must be fine.
    2. In order to solve this, load the date in text format into the list property and then convert it into date format. Refer to screenshots below to understand more:

    Module:

    Formula to convert date to text in consistent format: IF ISBLANK(Date) THEN BLANK ELSE TEXT(YEAR(Date)) & "-" & RIGHT("0" & TEXT(MONTH(Date)), 2) & "-" & RIGHT("0" & TEXT(DAY(Date)), 2)

    In the list property, create a property to load the date, and write the formula in the original date line item.

    Update the import action to import into a text-formatted date line item.

  • edited March 25

    @SofianeLz

    And especially don't have dates or transactional data in lists or list properties. Check out this document which explains why.

    Link

  • Hi @SofianeLz,

    This text-to-number-to-date formula will make a big impact on the model performance if your list is large.

    If using list properties is your only option, write the formula in a line item and refer to that line item in the property.

    I assume you are working on a previously built model; don't use list properties in a newly built model except for display names for numbered lists

    Hope this helps,

    Seyma 🌷🙂

  • edited March 26

    @SofianeLz - You can create another line item in a module with that list which "stores" this date instead of the property & then the property can refer to the line item.

    So every time a user runs an action you'd import the date to a line item in a module & the list property would fetch it from this line item instead of a direct import to the property.

    In this case when a date updates to blank, the date also clears in the module & thereby in the list property.

    It is strange that the date does not clear when stored as a property in a list.



    This would save you all the extra performance required in conversion of date from text & vice-versa.

    However, yes avoid list properties to begin with unless an absolute must.

    Hope this helps :)

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In