I have defined data in a procedure in two ways. One was simply through the IDE Data tab for my procedure and the other way was through an EMBED just before the procedure data (Start of “Declaration Section”). See clip of source. The data declarations are adjacent to each other in the source file, no code in between.
Here’s the problem … The data field LOC:Day1_0900 will display in the Window for my procedure. The data field (or any of the fields in that EMBED section) Day7_0400 will NOT display.
Any ideas why? I could muscle through it by adding each of the 112 fields in using the IDE, but that just seems … unnecessary.
The window designer doesn’t know about data that you’ve declared manually.
But you’ve already discovered that
No idea about C8.
With C11 you can click the down arrow shown, select Simple, and then manually create data stuff to your heart’s content (rather than one-at-a-time with the Insert/Edit variable screen).
And 97.38% of the time it actually works, saves the variables, doesn’t crash.
I’ll rephrase what @Clarion_clarion was trying to tell you how to easily add IDE data fields using your existing declarations:
In the Embeditor Data Embed Select your lines with Day7_0330 STRING(20) thru Day7_0430 STRING(20)
Then COPY to clipboard i.e. Ctrl + C
Click Data Pad “Local Data”, then click on a field e.g. Loc:DayState DATE
Press Ctrl+V to Paste
Your data will appear in the Data Pad below the variable in step 3
Back in the Data Embed delete your code, or I usually comment it out until I’m sure I have it all working
Not every hand code feature transfers so check the generated code. E.g. sometimes default value does not. Often the !Comment does not end up in Description
Thank you all for the replies. Copying and pasting into the Data section in the IDE worked like a charm!!! Wish I knew that a while ago.
I still don’t understand why the IDE embed point wouldn’t work. There is no visible code betweeen the two embed sections … another mystery that I guess doesn’t need solving.
I still don’t understand why the IDE embed point wouldn’t work. There is no visible code betweeen the two embed sections … another mystery that I guess doesn’t need solving.
When you create something in the data pad it gets a hidden ID GUID attached to it that the IDE uses internally.
So if, for example, you change the name of a variable in the data pad and then open the window designer in the IDE, the window designer will refresh itself and be using the correct (new) variable name.