Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: OrionHE on June 14, 2016, 01:54:49 PM

Title: how do I write a NULL value to a string tag in Designer?
Post by: OrionHE on June 14, 2016, 01:54:49 PM
My program has several email address tags that are concatenated with ";" to send a report to the recipients. The email addresses are optional. If I try to "remove" an address from the touch screen, it's as simple as entering the text box, clearing the box, and hitting enter. This removes the value from the tag and in the data view reads <empty-string>.

If I try to remove the value from a data view by deleting the value and writing the current edit, I get a message stating 'An empty Edit cell is interpreted as NO VALUE, not an empty string. If you wish to write an empty string, use Quoted format and enter empty string as two double quotes ""'

But if I use double quotes, then my email won't send and I get an error stating "501 <"">: recipient address must contain a domain".

How do I empty the string for real?
Title: Re: how do I write a NULL value to a string tag in Designer?
Post by: Bobby on June 14, 2016, 02:04:45 PM
STRCLEAR Instruction will clear it for you :)
Title: Re: how do I write a NULL value to a string tag in Designer?
Post by: OrionHE on June 14, 2016, 02:10:39 PM
Thank you for the suggestion. That would work, but requires an additional group of rungs. The C-more touch panel is able to clear the string, I'm looking for a way to do the same thing that the touch panel does, but through the data view. The fact that Do-more Designer tells me how to do it, and that it doesn't work seems to suggest a bug.

Not a proper fix, but I have found that putting a single space, without quotes, passes the email test. Unfortunately there are other cases where this would not be useful, appending " " is not the same as "".
Title: Re: how do I write a NULL value to a string tag in Designer?
Post by: BobO on June 14, 2016, 03:53:08 PM
I think you are misinterpreting the message. "Quoted" is a format in Data View. Select "Quoted" from the drop list at the top and enter "" as the edited value. The string will contain 0 length.
Title: Re: how do I write a NULL value to a string tag in Designer?
Post by: OrionHE on June 14, 2016, 03:57:03 PM
That did it. Thank you!
Title: Re: how do I write a NULL value to a string tag in Designer?
Post by: franji1 on June 14, 2016, 04:29:01 PM
In Data View, an empty edit cell for a numeric field implies that it has not been edited and hence you cannot write it.  The question then is, for a string element with Data View's ASCII edit/display format, does an empty edit cell mean that it has not been edited, or it has been edited but is an empty string?  To be consistent with numeric fields, an empty edit field of a string in ASCII format is interpreted as unedited.

As BobO stated, switching a Data View's string element format to Quoted format, the edit field state can now be distinguishable.  In Quoted format, an empty edit cell is in an unedited state (and cannot be written), but an edited cell that contains two double quotes "" is an empty string (and can be written as an empty string).
Title: Re: how do I write a NULL value to a string tag in Designer?
Post by: OrionHE on June 14, 2016, 04:32:29 PM
And that clarifies it. I was trying escape characters, double-double quotes. I just didn't know about the "Quoted" format. I never use that dropdown box on strings apparently.