Announcement

Collapse
No announcement yet.

Updating a checklist using formula

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

  • Updating a checklist using formula

    hi everyone,

    I wanted to ask if you know a way of populating a Checklist using a formula, I've been trying to find some info about it, and couldn't find it nor any previous post, but if I missed one please redirect me.

    So the thing is I want to have a checklist of documents received, and upon a new document upload, my intention is to check the document checklist on the related entity in order to have on a quick peek control of which documents I'm still missing. I've been trying to get the array of the chechklist field and push the value, as this is how it's shown at the DB, but it's not working. I can't use the bpm checklist setting as I don't know the previous state and doing it that way it overlaps all previous data.

    Any thoughts on that?

    Thanks a lot!

  • #2
    Found a way to do it, apparently I was not very far from a solution but it has a small thing. You can push a value into the checklist field, and that will check it, but 2 things to take into consideration:

    1- Field must be initialized, empty or with value, pushing a value will work like a charm.

    $newArray=record\attribute('Application',applicati onId, 'documentStatusChecklist');
    $newArray=array\push($newArray,type);
    record\update('Application',applicationId,'documen tStatusChecklist',$newArray);

    2- If not initialized, pushing a value into a null field would throw an error, so you need to control it and use for example the following formula:

    $newArray = list(type);
    record\update('Application',applicationId,'documen tStatusChecklist',$newArray);

    PD: Just leaving this as info. Thank you!

    Comment

    Working...
    X