# How to force load Initial Value from Dictionary when Insert in Form

**URL:** <https://clarionhub.com/t/how-to-force-load-initial-value-from-dictionary-when-insert-in-form/6018>\
**Category:** questions\
**Tags:** form, dictionary\
**Created:** [March 7, 2023, 5:23pm UTC](https://clarionhub.com/t/how-to-force-load-initial-value-from-dictionary-when-insert-in-form/6018 "2023-03-07T17:23:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThalesSilveirs](https://clarionhub.com/user_avatar/clarionhub.com/thalessilveirs/32/3642_2.png) [@ThalesSilveirs](https://clarionhub.com/u/ThalesSilveirs)\
**Post date:** [March 7, 2023, 5:23pm UTC](https://clarionhub.com/t/how-to-force-load-initial-value-from-dictionary-when-insert-in-form/6018/1 "2023-03-07T17:23:56Z")

</div>

I'm starting a FORM, and I indicate from the reading, if it's going to be an INSERT, and in that, I want it to load the INITIAL VALUE from the Dictionary. How do I force it to read the initial values?

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [March 7, 2023, 5:31pm UTC](https://clarionhub.com/t/how-to-force-load-initial-value-from-dictionary-when-insert-in-form/6018/2 "2023-03-07T17:31:08Z")

</div>

The ABC templates do that defaulting from within a browse, not a form. If you don’t have a browse, sometimes it’s simplest to create a small SOURCE procedure to mimic the stuff that the browse does. Then, when the FORM gets called, it gets everything it expects - as if it came from a browse. It’s been a long time since I’ve done ABC, but the source procedure could be something like:

```auto

CLEAR(My:Record)

IF NOT Access:MyTable.PrimeAutoInc()
  GlobalRequest = InsertRecord
  MyForm
  IF GlobalResponse = RequestCompleted
  MyFormWasSaved = TRUE
  END
END

```

---

<div class="post-metadata">

**Author:** ![JonW](https://clarionhub.com/user_avatar/clarionhub.com/jonw/32/1344_2.png) [@JonW](https://clarionhub.com/u/JonW)\
**Post date:** [March 7, 2023, 7:16pm UTC](https://clarionhub.com/t/how-to-force-load-initial-value-from-dictionary-when-insert-in-form/6018/3 "2023-03-07T19:16:17Z")

</div>

Like Jeff said, but PrimeRecord, not PrimeAutoInc (PrimeRecord will call PrimeAutoInc if required). And you don’t normally care about the GlobalResponse after the form is completed.

---

<div class="post-metadata">

**Author:** ![Rick\_UpperPark](https://clarionhub.com/user_avatar/clarionhub.com/rick_upperpark/32/346_2.png) [@Rick\_UpperPark](https://clarionhub.com/u/Rick_UpperPark)\
**Post date:** [March 7, 2023, 8:23pm UTC](https://clarionhub.com/t/how-to-force-load-initial-value-from-dictionary-when-insert-in-form/6018/4 "2023-03-07T20:23:32Z")

</div>

Access:.PrimeFields() is the actual method that populates the defaults. PrimeRecord calls PrimeFields.  
You can always add a call to FM PrimeFields from the window manager PrimeFields method.

```auto
if self.Request = InsertRecord
  self.Primary.ME.PrimeFields()
end

```
