Answered

Setting a default date for records in a collection

Hello, I have sucessfully set a date field to default to todays date, but when I tried to do it on another form, which its attributes exist in a child entity, it won't let me.

The code I am trying to set up is as follows.

<DisputeRaisingGN.DisputeNote.DisputeNoteDate>=DateTime.Today;

The error I get is below, Its saying it cannot find the attribute in/or the entity.

Am I doing something wrong ? The attribute DisputeNoteDate belongs in a collection entity attached to my main entity

Error: Code error: 11859 Error on ProcessForm

Code error: 10433 Error Evaluating Rule 10004:SetDatetotoday - Error The attrib "DisputeNote" on entity "Bizagi.EntityManager.Entities.DisputeRaisingGN" cannot be found -The attrib "DisputeNote" on entity "Bizagi.EntityManager.Entities.DisputeRaisingGN" cannot be found.

Functional InformationExecution List . Process Dispute - Raising-GN

. Activity Task11 . Bussines Rule SetDatetotoday . Error

Code error: 11859 Error on ProcessForm

Code error: 10433 Error Evaluating Rule 10004:SetDatetotoday - Error The attrib "DisputeNote" on entity "Bizagi.EntityManager.Entities.DisputeRaisingGN" cannot be found -The attrib "DisputeNote" on entity "Bizagi.EntityManager.Entities.DisputeRaisingGN" cannot be found.

Please try again later. If the error persists contact the system administrator.

photo
0

Dear Guy,

If setting the default value in an attribute of a collection (inside the record's form), the Xpath in this form will start off from the Collection entity.

Therefore, you should be able to define it as:

<DisputeNoteDate>=Me.getXpath("DateTime.Today");

Best regards,

photo
0

Thank you this worked, I think were I was going wrong was trying to apply the condition in the master form, not the sub form. Once I went into that and did it there it was fine. Thanks for your help.