Make a default Date

Hi Guys,

I'm Tring to make a default value for my originalEnd Date , and originalEnd date is a part of ri!project.originalEnd date 

how i can make default value in CDT if user is not going to enter any value ,

a!dateField(
label:"Original Date",
labelPosition: "ABOVE",

value: rule!RPF_property(ri!project_U, {"project", "currentEndDate"}, null),
saveInto: {

if(rule!RPF_isNullOrBlank(ri!project_U.project.originalEndDate),

type!{urn:com:appian:types:RPF}RPF_Project(
currentEndDate: today()+100,
)
,
ri!project_U.project.originalEndDate
)
},

required: false,

)

  Discussion posts and replies are publicly visible

Parents
  • If you are beginning from a process model, you can use a Script Task prior to the User Input Task to enter the originalEndDate as the desired value.

    Otherwise, you could set a local variable as the desired originalEndDate, and display this in the value: in the code above if there is no current value. If the user interacts with this field, then you will show the CDT value (and save into the CDT). If the user never interacts with this field, you could set it in the form's Submit button or some other "save" button, if desired.

Reply
  • If you are beginning from a process model, you can use a Script Task prior to the User Input Task to enter the originalEndDate as the desired value.

    Otherwise, you could set a local variable as the desired originalEndDate, and display this in the value: in the code above if there is no current value. If the user interacts with this field, then you will show the CDT value (and save into the CDT). If the user never interacts with this field, you could set it in the form's Submit button or some other "save" button, if desired.

Children