Focal Point
[Case opened] MISSING being interpreted literally by SQL

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3297034196

July 24, 2019, 11:12 AM
RyanIPG13
[Case opened] MISSING being interpreted literally by SQL
Opened a case with support, but wanted to ask if anyone had a similar issue.

We are running 8.206.01 in QA and we have missing on for a particular field in the metadata.

We are using autoprompt to pull in values on a page which we can multiselect. one of the possible values is "MISSING" since we can have nulls in the data.

When i look at the debugger, it looks like the sql is being written like this:

in 8202M:

((T1."MyField" IS NULL) OR (T1."MyField" = 'Value1'))


in 8206.01:

T1."MyField" IN('Value1', 'MISSING'))

It looks like the dropdown is passing the shown value, not the actual value of the missing item which would be NULL.

Anyone run into this?


Production: WebFOCUS 8.202M
QA: WebFOCUS 8.206.01
Windows/SQL
July 24, 2019, 12:14 PM
MartinY
Do you have your drop down setting "Send Display Value" checked (to true) ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
July 24, 2019, 12:51 PM
RyanIPG13
Hi Martin,

We're using a fex that was dropped onto the Page Designer, not the HTML Canvas.

The dropdown is populated using the page controls through the autoprompt in the fex.


Production: WebFOCUS 8.202M
QA: WebFOCUS 8.206.01
Windows/SQL
July 24, 2019, 12:53 PM
RyanIPG13
I did find that the SQL statement does process properly if we ONLY used the MISSING choice in the dropdown. If we multiselect MISSING and something else, it processes it as I originally mentioned.


Production: WebFOCUS 8.202M
QA: WebFOCUS 8.206.01
Windows/SQL
July 24, 2019, 05:08 PM
Waz
Is MISSING being passed to the fex with quotes ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

July 25, 2019, 07:31 AM
RyanIPG13
Waz,

Nope, it's being passed properly to the fex as '_FOC_MISSING'.

The SQL that it sends off to the database is being passed as 'MISSING' in quotes. So it's like the SQL is being written wrong by WebFOCUS, however the FEX is interpreting it properly.

This is the WHERE condition of the fex:

WHERE MyField EQ 'Value1' OR '_FOC_MISSING';


This is the SQL it writes:

(T1."MyField" IN('Value1', 'MISSING'))


It's like it can't translate _FOC_MISSING to a NULL on the SQL translation side of things. Because it's translating it literally as 'MISSING' it also puts it in an "IN" SQL clause instead of breaking out into an "OR" like it does in 8202M.


Production: WebFOCUS 8.202M
QA: WebFOCUS 8.206.01
Windows/SQL
July 25, 2019, 05:23 PM
Waz
Certainly sounds like bug.

Good luck with the case


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

August 26, 2019, 11:14 AM
Mike in DeLand
What if you wrote the webfocus WHERE in 2 whole phrases

WHERE myfield EQ 'value' OR myfield EQ _FOC_NULL;

or perhaps

WHERE myfield EQ 'value' OR myfield IS MISSING;


Webfocus 8
Windows, Linux