Check Invalid Filter Rule in DXL

Hello,

 

i have a Problem with DXL and Filtering.

 

What i do is open some Views in a module and try to add a column and save the view afterwards.

That is not a Problem, but in Case the View has an "Invalid Filter Rule"-Error how can i handle that?

 

If i get the View and the User press the "OK" button, then i see only the "new" filter.

The invalid part is then already deleted by doors.

 

If i use the function load(module, view) it says true for loading the View. in DXL it seems no error ocurred.

 

What i want to do is that i only Change the columns in the view if there is no "Invalid Filter Rule" Error.

noError() doesn't work as in previous threads is discussed.

 

Loading invisible with a "defect" view didn't work too, it opens the view, the Message to the User didn't Pop up.

But when adding the column to the view and save the view, the Filter is cleaned from the "invalid part" too.

 

Does anyone know how to handle this case?

 

Thanks.

Rainer

 

 


ProgrammingRai - Thu Nov 29 14:02:50 EST 2018

Re: Check Invalid Filter Rule in DXL
davidcs - Thu Nov 29 14:41:37 EST 2018

If the pop-up is blocking you from doing something, just overload it in your script. If you don't know which one to overload, just do them. That is what I usually do when this happens.

void errorBox(string s) {print "Error: " s}
void warningBox(string s) {print "Error: " s}

void ack (string s) {print "Acknowledge: " s "\n" }
void acknowledge (string s) {print "Acknowledge: " s "\n"  }

void infobox (string s) {print "Info: " s "\n" } 
void info (string s) {print "Info: " s "\n" } 

int query (string s, string buttons[] ) {print "Query: " s "\n"; return 0}
int messageBox(string s, string buttons[] , int severity) {print "MessageBox: " s "\n"; return 0} 
bool confirm (string s) { print "Confirmed: " s "\n"; return true }

int query (DB aDB, string s, string buttons[] ) {print "Query: " s "\n"; return 0}
int messageBox(DB aDB, string s, string buttons[] , int severity) {print "MessageBox: " s "\n"; return 0}

 

Re: Check Invalid Filter Rule in DXL
ProgrammingRai - Fri Nov 30 07:37:21 EST 2018

davidcs - Thu Nov 29 14:41:37 EST 2018

If the pop-up is blocking you from doing something, just overload it in your script. If you don't know which one to overload, just do them. That is what I usually do when this happens.

void errorBox(string s) {print "Error: " s}
void warningBox(string s) {print "Error: " s}

void ack (string s) {print "Acknowledge: " s "\n" }
void acknowledge (string s) {print "Acknowledge: " s "\n"  }

void infobox (string s) {print "Info: " s "\n" } 
void info (string s) {print "Info: " s "\n" } 

int query (string s, string buttons[] ) {print "Query: " s "\n"; return 0}
int messageBox(string s, string buttons[] , int severity) {print "MessageBox: " s "\n"; return 0} 
bool confirm (string s) { print "Confirmed: " s "\n"; return true }

int query (DB aDB, string s, string buttons[] ) {print "Query: " s "\n"; return 0}
int messageBox(DB aDB, string s, string buttons[] , int severity) {print "MessageBox: " s "\n"; return 0}

 

Hello Davidcs,

 

thanks for your hint.

I've tried this but that didn't work. The "Invalid Filter Rules Dialog" appears with Title "DOORS Bericht" or i think "DOORS Report" in english Version.

 

So this must be another Type of Dialog which must be overload.

 

Best Regards,

Re: Check Invalid Filter Rule in DXL
davidcs - Fri Nov 30 07:40:59 EST 2018

ProgrammingRai - Fri Nov 30 07:37:21 EST 2018

Hello Davidcs,

 

thanks for your hint.

I've tried this but that didn't work. The "Invalid Filter Rules Dialog" appears with Title "DOORS Bericht" or i think "DOORS Report" in english Version.

 

So this must be another Type of Dialog which must be overload.

 

Best Regards,

"DOORS Report" being an unhandled DXL error? It is probably just an error in the code somewhere. 

Re: Check Invalid Filter Rule in DXL
ProgrammingRai - Fri Nov 30 07:53:50 EST 2018

davidcs - Fri Nov 30 07:40:59 EST 2018

"DOORS Report" being an unhandled DXL error? It is probably just an error in the code somewhere. 

The error is not in the dxl code.

It's shown because a part of the filter code is invalid (thats true). And then i get the message "invalid filter rule".

 

In my DXL Code then i can't see that the error is occurred, can i? (noError und lastError didn't show an error)

 

The case is that the filter in the view is invalid (some parts may have changed).
I want to add some attributes to some views, but i don't want to overwrite existing filters.

In the case the "Invalid Filter Rule" has occurred, i have in my module only the valid Filter Part (the invalid part is removed from doors).

If i save now the view i would save the new reduced filter, what i don't want to do. I want to preserve the old Filter with invalid part.

 

Best regards,
Rainer

 

Re: Check Invalid Filter Rule in DXL
davidcs - Fri Nov 30 07:54:38 EST 2018

Oh, maybe you are right ... maybe it can't avoid it. Frown

https://www.ibm.com/developerworks/community/forums/html/topic?id=fbd2855f-d60b-419a-9fac-88c8fab7ea76