In my environment, i have configured behaviors for few custom fields. But the values entered in those custom fields during create screen are not showing when the user trying to see those values in edit screen.
I can in view screen but during edit screen the values in those custom fields are not showing up.
Here is the sample code i have written for one custom field.
def PCFRequestType = getFieldByName("PCF Request Type").getValue().toString()
def PCFFoundationName = getFieldByName("PCF Foundation Name")
def OrgName = getFieldByName("Org Name")
def SpaceName = getFieldByName("Space Name")
def PCFFoundationType = getFieldByName("PCF Foundation Type")
def OnboardingType = getFieldByName("Onboarding Type")
def ApplicationType = getFieldByName("Application Name")
def ComponentToBeScaled = getFieldByName("Component to be Scaled")
def RequestedCapacity = getFieldByName("Requested Capacity")
def ServiceType = getFieldByName("Service Type")
def ErrorMessage = getFieldByName("Error Message")
def StepstoReproduce = getFieldByName("Steps to Reproduce")
def TriageStepsAlreadyTaken = getFieldByName("Triage Steps Already Taken")
def ADGroup = getFieldByName("AD Group")
getFieldByName("Buildpack Name").setHidden(true)
getFieldByName("Buildpack Version").setHidden(true)
getFieldByName("Tile Name").setHidden(true)
getFieldByName("Tile Version").setHidden(true)
getFieldByName("User Name").setHidden(true)
getFieldByName("PCF Role(s)").setHidden(true)
getFieldByName("AD Group").setHidden(true)
getFieldByName("PCF Version").setHidden(true)
getFieldByName("PCF Foundation Type").setHidden(true)
//getFieldByName("Space Name").setHidden(true)
OnboardingType.setHidden(true)
ApplicationType.setHidden(true)
ComponentToBeScaled.setHidden(true)
RequestedCapacity.setHidden(true)
ServiceType.setHidden(true)
ErrorMessage.setHidden(true)
StepstoReproduce.setHidden(true)
TriageStepsAlreadyTaken.setHidden(true)
PCFFoundationType.setHidden(true)
//ADGroup.setHidden(true)
PCFFoundationName.setFormValue(null)
OrgName.setFormValue(null)
OnboardingType.setFormValue(null)
ApplicationType.setFormValue(null)
ComponentToBeScaled.setFormValue(null)
RequestedCapacity.setFormValue(null)
ServiceType.setFormValue(null)
ErrorMessage.setFormValue(null)
StepstoReproduce.setFormValue(null)
TriageStepsAlreadyTaken.setFormValue(null)
ADGroup.setFormValue(null)
PCFFoundationType.setFormValue(null)
SpaceName.setFormValue(null)
if (PCFRequestType == 'Onboarding')
{ OnboardingType.setHidden(false) OnboardingType.setRequired(true) }
else if (PCFRequestType == 'Increasing Capacity')
{ ApplicationType.setHidden(false) ApplicationType.setRequired(true) ComponentToBeScaled.setHidden(false) ComponentToBeScaled.setRequired(true) RequestedCapacity.setHidden(false) RequestedCapacity.setRequired(true) SpaceName.setRequired(true) }
else if (PCFRequestType == 'New Marketplace Service')
{ ServiceType.setHidden(false) ServiceType.setRequired(true) SpaceName.setRequired(true) }
else if (PCFRequestType == 'Break-Fix')
{ ApplicationType.setHidden(false) ApplicationType.setRequired(true) ErrorMessage.setHidden(false) ErrorMessage.setRequired(true) StepstoReproduce.setHidden(false) StepstoReproduce.setRequired(true) TriageStepsAlreadyTaken.setHidden(false) TriageStepsAlreadyTaken.setRequired(true) SpaceName.setRequired(true) }
xxx.setFormValue(null) is your problem.
You are explicitly telling the behavior to clear our those fields.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.