Announcement

Collapse
No announcement yet.

notStorable field with where clause on the main entity record

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • notStorable field with where clause on the main entity record

    Hi Devs,

    I have an entity that has a lot of fields on it. I want to add a not storable field that checks all these fields are filled and shows the entity as 'Complete' or 'Incomplete' as a quick visual reference for the user and for select validation. I thought I'd be able to do this using something simple like:

    PHP Code:
            "isComplete": {
                
    "type""varchar",
                
    "isCustom"true,
                
    "notStorable"true,
                
    "readOnly"true,
                
    "select": {
                    
    "select""IF:(EQUAL:(COUNT:(id),0), 'Incomplete', 'Complete')",
                    
    "where": {
                            
    "guid!="null,
                            
    "batch!="null
    ... other fields ....
    ​                }
                }
            }
    ​ 
    I've tried all sorts of different combinations including trying to use whereClause instead of where, pulling the where clause outside of the main select object, the simplest possible implementation and various other things but I can't make the where clause affect the record at all. I can't find an example of this use case in the code and I think maybe using where like this doesn't work. Does anyone know how to do it?

    Cheers,
    Clare
Working...
X