Skip to main content
Inspiring
Apr 7, 2022 4:23 PM UTC
Question

Default value to add to a rule input which is of CDT

Hi,

I have below kind of interface (editable grid) to upload multiple documents. By default, I am providing 1 row and when user click on "Add Document" I am adding additional. 

I have a rule input which is of CDT like below

I was able to insert "Document Type" value to DoCTypeCode and "UPLOAD" to DocumentID. But, I was unable to inert values to "DateAdded" and "AddedBy".

I have to store "DateAdded" as loggedinuser() and "AddedBy" as now().

Is there away I can load default values into these columns in the page load or when the user selected "Document Type" dropdown.

Thanks.

2 replies

gopalk2865
Participating Frequently
Apr 7, 2022 4:45 PM UTC

Hi Hari, yes you can do that in your dynamic link's saveInto. You can configure something like below,

a!save(ri!yourCdt,

append(

ri!yourCdt,

type!yourCdt( addedby:loggedInuser,addedOn:now()

)

)

Another way would be to use script task in your process model to update the process variable which will be inserted to db.

Inspiring
Apr 7, 2022 5:03 PM UTC

Thank you so much for your quick advise. I really appreciate.