I have a question regarding sail. I have a textfield that looks like this:

I have a question regarding sail. I have a textfield that looks like this:

a!textField(
                    label:"City",
                    required:true,
                    value: if(rule!COMMON_IsNullOrEmpty(ri!selectedLocationId), ri!companyLocation.CityName, local!companyLocation.CityName,
                    saveInto:ri!companyLocation.CityName
           )

if ri!selectedLocaitonId is not null then get the value from local!companyLocation.CityName which is getting its value from a query rule. So whenever ri!selectedLocationId is not null I am not able to edit the populated value in this textField brought by local!companyLocation.CityName. So I would like to know how I can edit this textfield when ri!selectedLocationId is not null and ri!companyLocation.CityName is a rule input that's being mapped all the way into the process.So my question is how would I be able to edit this textfield and save that edited value....

OriginalPostID-109903

OriginalPostID-109903

  Discussion posts and replies are publicly visible

  • You can put the if logic in your local! variable when you initially declare it. As for saving the value back into a rule input, I don't think that is possible, so I changed it to save into the local! variable.

    local!companyLocation:if(<condition>, ri!companyLocation, "default value"),
    a!textField(
                         label:"City",
                         required:true,
                         value: local!companyLocation,
                         saveInto:local!companyLocation
               )