hexagon logo

Pulling a value out of a tracefield

In reading some of the comments here today about using the GETCOMMAND function. I thought I'd experiment with extracting a value from a tracefield. Now I just have to add it to the saveas command we've seen here http://www.pcdmisforum.com/showthread.php?21546-Scripting-Help-for-auto-Save-as&highlight=saveas


According to the PC-DMIS help file Using GETTEXT should pull the text from a string.

Here is what I have:
I want to pull the "777" value from the tracefield, which the gettext command does so the serial number from the tracefield can now be used as part of the file name for a Save as command
as soon as I can figure that part out.

            TRACEFIELD/DISPLAY,LIMIT=15 ; test : 777
            ASSIGN/V2=GETCOMMAND(191,"top",1)
            ASSIGN/SRN=GETTEXT(258,1,V2)


This something I have been trying to figure out for a while, it could come in handy, you could evaluate it and use it for all types of program control or even check if it is left blank. I am sure you could even check if it's been changed since the last run.