# Data Declared in Embed Cannot be Selected in Window Designer

**URL:** <https://clarionhub.com/t/data-declared-in-embed-cannot-be-selected-in-window-designer/6364>\
**Category:** questions\
**Tags:** ide\
**Created:** [July 6, 2023, 12:27am UTC](https://clarionhub.com/t/data-declared-in-embed-cannot-be-selected-in-window-designer/6364 "2023-07-06T00:27:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeutronBoy](https://clarionhub.com/user_avatar/clarionhub.com/neutronboy/32/4355_2.png) [@NeutronBoy](https://clarionhub.com/u/NeutronBoy)\
**Post date:** [July 6, 2023, 12:27am UTC](https://clarionhub.com/t/data-declared-in-embed-cannot-be-selected-in-window-designer/6364/1 "2023-07-06T00:27:43Z")

</div>

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.

 ![image](https://clarionhub-uploads.s3.dualstack.eu-north-1.amazonaws.com/original/2X/d/d46f96a9627f13aa9f902b5d9d2fb3153b9fc717.png)  
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.

thanks

Mark

---

<div class="post-metadata">

**Author:** ![Jane](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@Jane](https://clarionhub.com/u/Jane)\
**Post date:** [July 6, 2023, 1:18am UTC](https://clarionhub.com/t/data-declared-in-embed-cannot-be-selected-in-window-designer/6364/2 "2023-07-06T01:18:02Z")

</div>

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.

 ![editDataDeclarations](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/e/e35ef600683b0de94e9038a5ccd2b38ae82432a9.png)

---

<div class="post-metadata">

**Author:** ![Clarion\_clarion](https://clarionhub.com/user_avatar/clarionhub.com/clarion_clarion/32/636_2.png) [@Clarion\_clarion](https://clarionhub.com/u/Clarion_clarion)\
**Post date:** [July 6, 2023, 7:55am UTC](https://clarionhub.com/t/data-declared-in-embed-cannot-be-selected-in-window-designer/6364/3 "2023-07-06T07:55:58Z")

</div>

> [@NeutronBoy](#):
>
> I could muscle through it by adding each of the 112 fields in using the IDE

I see no problem with it. In your favorite text editor (like Notepad) just create all variable you need in simple format

```auto
loc:var1 string(20)
loc:var2 string(20)
loc:var3 string(20)
etc..

```

then simply COPY it, select the Local Variable section in IDE Data tab, and Paste it! it will automatically create all you need!

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [July 6, 2023, 2:49pm UTC](https://clarionhub.com/t/data-declared-in-embed-cannot-be-selected-in-window-designer/6364/4 "2023-07-06T14:49:43Z")

</div>

> [@NeutronBoy](#):
>
> The data field (or any of the fields in that EMBED section) Day7\_0400 will NOT display.

I’ll rephrase what @Clarion_clarion was trying to tell you how to _easily_ add IDE data fields using your existing declarations:

1. In the Embeditor Data Embed Select your lines with `Day7_0330 STRING(20)` thru `Day7_0430 STRING(20)`
2. Then COPY to clipboard i.e. Ctrl + C
3. Click Data Pad “Local Data”, then click on a field e.g. `Loc:DayState DATE`
4. Press Ctrl+V to Paste
5. Your data will appear in the Data Pad below the variable in step 3
6. 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

---

<div class="post-metadata">

**Author:** ![NeutronBoy](https://clarionhub.com/user_avatar/clarionhub.com/neutronboy/32/4355_2.png) [@NeutronBoy](https://clarionhub.com/u/NeutronBoy)\
**Post date:** [July 7, 2023, 7:56pm UTC](https://clarionhub.com/t/data-declared-in-embed-cannot-be-selected-in-window-designer/6364/5 "2023-07-07T19:56:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jane](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@Jane](https://clarionhub.com/u/Jane)\
**Post date:** [July 7, 2023, 10:55pm UTC](https://clarionhub.com/t/data-declared-in-embed-cannot-be-selected-in-window-designer/6364/6 "2023-07-07T22:55:41Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![NeutronBoy](https://clarionhub.com/user_avatar/clarionhub.com/neutronboy/32/4355_2.png) [@NeutronBoy](https://clarionhub.com/u/NeutronBoy)\
**Post date:** [July 9, 2023, 1:15pm UTC](https://clarionhub.com/t/data-declared-in-embed-cannot-be-selected-in-window-designer/6364/7 "2023-07-09T13:15:29Z")

</div>

Thanks Jane, I now see those tags that the system adds when I look at the SIMPLE/COMPLEX drop down
