Highlighted
Regular Contributor.
Regular Contributor.
412 views

Add new field only for new records

Jump to solution

Hi,

I want to add a new mandatory field to change request form, but it should be there only for new records created. 

I added it, along with validation in format control to make it mandatory but don't know how to make it only for new records without affecting the already existing records.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Add new field only for new records

Jump to solution

Tyson,  do you only want it required when someone adds a record, but no other time?  If so, then only put an expression in the Add condition for the validation.  Don't put one in Display, Update or Delete.

View solution in original post

4 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Add new field only for new records

Jump to solution

Tyson,  do you only want it required when someone adds a record, but no other time?  If so, then only put an expression in the Add condition for the validation.  Don't put one in Display, Update or Delete.

View solution in original post

Highlighted
Regular Contributor.
Regular Contributor.

Re: Add new field only for new records

Jump to solution

Hi TomPowe,

Thanks for your suggestion. Yes, I do want this field to be mandatory when the user raises an new request.

I did the same but I am able to see the field in existing records also apart from newly created ones. For old records, when I am pushing them forward it is asking me to fill the field, else it's not going to the next phase (due to the validation in that particular format). Is there any way to hide this field for existing records? It should be visible only when someone raises a new change request.

Regards,

Tyson

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Add new field only for new records

Jump to solution

For the Add expression, you could do; 

null(XXX in $file) and (current.phase in $file) isin {"Change Logging", "Registration"}

 

Highlighted
Regular Contributor.
Regular Contributor.

Re: Add new field only for new records

Jump to solution

Thanks TomPowe.

Regards,

Tyson

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.