Skip to main content
Solved

Puzzle by Modern UI adding a field I wasn't expecting.

  • Dec 3, 2026 8:28 PM UTC
  • 7 replies
  • 33 views
  • Translate All

Forum|alt.badge.img+8

This is a simple screen. I have a From Date/To Date filter that acts upon the primary view of the graph.

The relevant parts of the TS file looks like this:

@graphInfo({graphType: "XYZCommonMods.XYZLogMaint", primaryView: "Details", })
export class XY303100 extends PXScreen {
Details = createCollection(XYNLLogs);
FilterView = createSingle(XYNLLogFilter);
}

export class XYNLLogFilter extends PXView {
FromDate: PXFieldState<PXFieldOptions.CommitChanges>;
ToDate: PXFieldState<PXFieldOptions.CommitChanges>
}

The HTML file looks like this:

<template>
<qp-template id="form-Filter" name="17-17-14" class="equal-height">
<qp-fieldset
id="fsColumnA-Filter"
slot="A"
view.bind="FilterView">

<qp-field
control-state.bind="FilterView.FromDate">
</qp-field>
</qp-fieldset>
</qp-template>

<qp-grid id="grid" view.bind="Details"></qp-grid>

</template>

The screen renders like this:

My question is this: Where did To Date come from? It isn’t explicitly included in the HTML but was somehow included? To be clear, I’m fine with it being there, I just didn’t know why it’s there.

ACM 26.101.0225

Best answer by darylbowman

Not sure this has anything to do with it, but why are you defining your fields as <qp-field>? It should be <field name="FromDate"></field>

 

You're defining them like you would when you're making them sub-fields or partial-column.

View original

7 replies

JKurtz29
Semi-Pro I
Forum|alt.badge.img+1
  • Semi-Pro I
  • Dec 3, 2026 10:21 PM UTC

The field was created in the .ts, so it’s available to be displayed on the screen via the UI Configurator.  

Unless that’s how you added it (or something cached it that way), and that .html is the actual file that got compiled into the screen, then yes, I agree, weird.

Not saying this is the case, but similar instances, I’ve compiled a screen via the command prompt and not seen the update reflected on the screen.  This was because I had previously published the screen extension through the publish process.  For the new changes to stick, I needed to go back into the project, fetch the modified files, and then publish from there.

Translate

darylbowman
Captain II
Forum|alt.badge.img+17

Not sure this has anything to do with it, but why are you defining your fields as <qp-field>? It should be <field name="FromDate"></field>

 

You're defining them like you would when you're making them sub-fields or partial-column.

Translate

Samvel Petrosov
Jr Varsity III
Forum|alt.badge.img+9

Did you have at any point layout personalization on that page? It may have saved the field before it was removed from the files? If the field was ever added to the files.

Translate

Forum|alt.badge.img+8
  • Author
  • Captain II
  • Dec 3, 2026 11:34 PM UTC

Not sure this has anything to do with it, but why are you defining your fields as <qp-field>? It should be <field name="FromDate"></field>

 

You're defining them like you would when you're making them sub-fields or partial-column.

My intention was to put the two date fields side-by-side and then I stepped away from the project and upon my return, was puzzled. :)

You were correct, it did have something to do with it. It seems to have been unintended consequences of how I defined the fields originally.

This is the correct HTML:

<template>
<qp-template id="form-Filter" name="17-17-14" class="equal-height">
<qp-fieldset id="fsColumnA-Filter" slot="A" view.bind="FilterView">
<field name="FromDate">
<qp-field control-state.bind="FilterView.ToDate"></qp-field>
</field>
</qp-fieldset>
</qp-template>

<qp-grid id="grid" view.bind="Details"></qp-grid>

</template>

Which produces:

Now I just need to change the caption and I’m golden.

Translate

Forum|alt.badge.img+8
  • Author
  • Captain II
  • Dec 3, 2026 11:35 PM UTC

Did you have at any point layout personalization on that page? It may have saved the field before it was removed from the files? If the field was ever added to the files.

I think was a case of the compiler not knowing how to handle my incorrect formatting.

Translate

darylbowman
Captain II
Forum|alt.badge.img+17

 I think was a case of the compiler not knowing how to handle my incorrect formatting.

I've seen some weird stuff when getting off the beaten path.

Translate

darylbowman
Captain II
Forum|alt.badge.img+17

Now that I'm thinking about it, I believe if you define a fieldset without any fields in it, it automatically displays all the fields. If the compiler didn't recognize your field syntax, I bet that's what happened.

Translate