The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

rule condition- check field for space

Highlighted
Jeff Barske
Occasional Contributor

rule condition- check field for space

Is there a way in a rule to set the condition to check where a field value is exactly space. I know that you can use a custom field and set its value to always be a space and then compare this custom field to field being checked. But I hate to burn a custom field for this purpose. Is there a way to enter an escape character into the condition. I have tried " " and ' ' and \ . We are on SD 4.5 SP17.
3 REPLIES
Craig R Taylor
Collector

Re: rule condition- check field for space

That one is tough and I believe I saw this question posted previously. I imagine you are checking to see if the user just put a space into the field and nothing else to make sure they actually put something. (A space not being consider "nothing").

I'm posting more to bump this up so that hopefully someone has an answer to this question.
You can observe a lot just by watching. - YOGI BERRA
George M. Meneg
Honored Contributor

Re: rule condition- check field for space

Hello Jeff,

The only thing I can think is to use of the update function "Remove trailing spaces" from that field and then to check if this field is empty. But that's not exactly what you want since the "remove trailing spaces" will remove any number of trailing whitespaces.

Using a custom field is your best chance. Furthermore on SP19 or higher you can create a new type of custom text field with exactly 1 char length!
menes fhtagn
Jeff Barske
Occasional Contributor

Re: rule condition- check field for space

I ended up using a custom field that is set to a space when the Service Call is created. Opened case 3220252952 with HP and they too said this was the only way to check if another field contains a space. Craig, I was not checking to see if a user put in a space, but thanks anyway for the input. I was actually using this for part of a fix for the APM UI rule that clears information update. We moved the APM UI "When Opened" clear information update rule to a "When Saved" db rule to reduce merge conflicts and get rid of annoying "Do you want to Save Changes" when a person just viewing the Service Call closes the form. We are storing a space to information update after it is copied to the running Information field. This is because we have it set to require (must be bold on form) information update for certain statuses. We changed the other 2 APM db rules that copy information update to the running information field to ignore when information update is a space. We are implementing this for Change, Problem, and Work Order too as these have the same APM rules.
//Add this to "OnDomLoad" event