Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This can be done by entity on create method. That method can be created when u click on Server - Database - Table name, then choose HTML Client and create new "created event". Then you can set default values in a new created item.</p> <p>ie:</p> <pre><code>myapp.Leistungserfassung.created = function (entity) { var now = new Date(); entity.CreatedTime = now; entity.UpdatedTime = now; entity.Pause = 30; myapp.activeDataWorkspace.Database.SomePickerAttribute .top(1) .execute().then(function (result) { entity.SomePickerAttribute= result.results[0]; }); </code></pre> <p>};</p> <p>myapp.activeDataWorkspace.Database.SomePickerAttribute.top(1)</p> <ul> <li>this will load first record (u can specify more then 1)</li> </ul> <p>.then()</p> <ul> <li>will execute after AJAX call retrieve item from the server</li> </ul> <p>The rest is up to you.</p> <p>If you have situation that you need to put default values to eq. "filter" on a list screen. You can do it same way as example above, (on screen create) but this time put needed value into property that is binded to your picker. Only problem is that your label won't get updated. This can be solved with little jQuery.</p> <p>For example:</p> <pre><code>myapp.activeDataWorkspace.LeistungserfassungScreenItemsData.LeistungserfassungDateFilters.top(1).execute() .then(function (result) { $('#datePicker') .find('.id-element') .html(result.results[0].Text); }); </code></pre> <p>Remember to put ID to your picker element. This can be done on <code>_postRender</code> event with this little command: <code>$(element).find('.id-element').attr('id', 'datePicker')</code></p> <p>I'm still beginner so I'm sure there are other better ways to do this. But for now this are only ones I know. And I could say that they work OK.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload