Interface

Certified Senior Developer

I am having a editable grid in that there is a field that should autopopulate a value

eg. there are two fields start date and end date I want to find the difference and then in days field it autopopulate the no of days 

In interface level the value is showing in that field but it is not saving in rule input

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Udhaya Kumar M

    Actually you are passing the logic in the value field try to pass the same on the saveInto end date field. Save Into for a field works when you perform some action on that field. 

    Use the below code for saveInto of your end date. Value will be saved to your rule input.

    {
        fv!item.enddate
        if(
          a!isNullOrEmpty(
            fv!item.enddate
          ),
          {},
          a!save(
            fv!item.demandhours,
            (
              tointeger(
                tointervalds(save!value) - tointervalds(fv!item.startdate)
              )
            )
          )
          )
        )
      }

Children