Window title not changing - use of [ character

Version Relevance: All versions

Issue: We have some parts, that when you view them on the maintenance window, it's title bar still shows the previously viewed part number and description. Also drill-down windows can show a corrupted title bar. What is going on?

Mar 2nd, 2007

Feedback: You have used a square bracket [ character in either of the part number, description or stock unit of measure. Square brackets are special to Omnis Studio. In text the use of square brackets tells Omnis Studio to calculate the contents and render the result. So an opening square bracket [ signals the start of a calculation to make. Hence where Caliach Vision applies data to text entities, such as a window title bar, Omnis Studio attempts to interpret the contents of a [..] pair. If the contents can be calculated, such as [3*7] all well and good (in this case, 21), but if there is no meaningful calculation possible, Omnis Studio will simply fail to set any text at all, so the window title bar will remain unchanged.

Because of this, you should be wary of using the [ character in any data field, but in particular the following will lead to problems of the kind described:

  • Any code, e.g. Customer or supplier code
  • Any company name e.g. customer, marketing, supplier
  • Part description and stock unit of measure
  • G/L account name
  • Any file path
  • Linked document description
  • A custom search name

If you already have used square brackets and want to mass-change them, the following is some example code that changes [ for { and ] for } in part descriptions.

Begin reversible block
  Set main file {PTMFILE}
End reversible block
Find first on PTMPTNO
While flag true
  Working message (Repeat count) {Processing parts...}
  If pos('[',PTMDESC)>0|(pos(']',PTMDESC)>0)
    Set read/write files {PTMFILE}
    Do $ctask.tData.$EditPrepNoQuit()
    Calculate PTMDESC as replaceall(replaceall(PTMDESC,'[','{'),']','}')
    Update files
    Set read-only files {PTMFILE}
  End If
  Next on PTMPTNO
End While

Chris Ross - Caliach Design