Conditional Expression "greater than 0" on null fields

01 Oct '14, 04:57 PM
Forum Forum Starter - Level 3

Hi everyone,
I have a Volatile (Sessione Scope) Entity E; it has a key Field K and a float attribute A. It is filled with some records, and I want to extract all records for which A > 0.
To do so, I defined a Selector Unit and a Conditional Expression in field A, predicate Greater-Than, value 0.

It seems not to work properly: records in which A is null are returned as well.
I had to add a further condition on the same field A, predicate Is-Not-Blank (or, Is-Not-Null). So it works but it looks like a workaround not a clean modeling.

Someone noticed or can confirm this behaviour?

Tks in advance

x 0
Answer Answer at this question and get points!
Forum Expert - Level 5

Hi Ettore,
what is the version of WebRatio that you use? 
I have test your case that you have explained, with the last release of WebRatio 7.2.6 and the Conditional Expression seems work correctly by deleting the records in which A is null.

Best regards,
Ombretta Malinverno 

x 1
Forum Starter - Level 3

Hi Ombretta,
thanks for your reply. I have a WR 7.62. Actually, in a simple project I made for test, you're right: it works. In my project, surprisingly, it does not.
After a Selector with a Conditional Expression "imponibile" - Greater than - 0, I added a Script Unit to log the selected records, and this is an excerpt from the log file:
 0) Iva: FC  imponibile: null
 1) Iva: null  imponibile: 208.0
 2) Iva: NOI  imponibile: 10000.0
 3) Iva: null  imponibile: 400.0
 4) Iva: ES  imponibile: 100.0
The first record is not expected.
The only difference with the test project is that the "imponibile" field is not really float, but a subtype of float. I did the same in the test project, and it still works fine.
Thus, WebRatio seems to be ok, and something else is wrong in my project. By now, the best is to add a second Condition Expression as a workaround. I'll let you know if I should ever understand what is going wrong.


x 0
Answer at this question and get points!

Related questions

Acceder a diferentes site views/ Acces to diferents site views Add to Bag link in ACME any webratio book ? Asking For a Book Attribute comparison in a selector unit Clarification about the NoOperation unit Codigo QR Como hacer un menu en webratio? Connect more query unit Content module page variable won't assign. coupled mandatory fields Create Unit with Date (Year only) Custom Attributes Condition Database Database List is not showing up in App Emulator Data is always created doubled Data Management: Updating Data - Attachments - Updating Data Sample Project Final Description: Unknown tag 'wr:LinkResource' Dudas sobre modelado(Data Flow,Forms y Operation Create) Empty record mistakenly saved en_US codify problem Export XML external link.= Filter information in a Simple List Format currency forward/backward navigation and bookmark in ajax web app "Generation Error" with Generate and Run Generation options problem get the attachment files of an email Get Unit problem Get Year from Date Help for connect public and private site views How can i create pagemenu or landmarkmenu with multiple levels. How does WebRatio represent these IFML elements? / ¿Cómo representa WebRatio estos elementos IFML? How i can reuse modules in multiple projects? How to define the sequence of execution units on a page? How to display the attributes of a related entity. How to filter imported attributes? How to include Selector Unit result in Mail Unit Body? How to pass vars to a alternative page How to process IFML Model (build with Eclipse editor) with ATL How to show a page based on a boolean? How to speed up the "last" link using PowerIndexUnit for lots of records How to store data related to an entity in relationships in a project web Insert data into database Insert master page to many hybrid modules Integrating a BPM model into an existent WebML model JSON I/O Unit e informazioni derivate KO Links in Selector Unit Landmark in hybrid module Link localization Links from Index unit with condition Link Visibility Condition Power Index Unit Mail multipla maintain the record order in a sortable list Math Unit to update attributes of an entity? [MOBILE] How I extract information from JSON client side? Modifica Entità tramite file xml Multi Entry Unit: How to forward only checked rows? multi-lingual product description Non riesco a fare funzionare Xml out unit Parametrizzazione Selector Unit Problem Example create Unit (no company in employee table) Problem in adding diagrams in IFML Editor (Eclipse) Problem with query unit! Problem with Scroller Unit query a database Question about Site Views Rename passing attributes Replace ID by its value in another table Search by Selector component does not work Select between parameters Selector unit doesn't return any value in hybrid module Sending mails is not working Sending mails with gmail is not working Setting the Default link for a Switch unit show/hide fields on button click (registration page) [solved] all links transparent, why ? Something leads to wrong condition expression evaluation. sumar atributos de una tabla filtrado por Role Condition Sum entity's values Transportation Link issue Unique Fields using relationship role conditional with null usuarios y grupos utilizzo componenti database Visibility Condition on Multiple Links From Index Unit WebRation - Create Navigation diagram