[SOLVED] Why would a simple IF ... WAS CHANGED rule fail?
[SOLVED] Why would a simple IF ... WAS CHANGED rule fail?
IF TicketR.ps_MainResource WAS CHANGED AND TicketR.ps_MainResource IS DEFINED THEN
The "was changed" was crapping out (like it does above), but the IS DEFINED would evaluate TRUE. Overall it was false and not executed.
I'm in Edit mode. The record was already created with a null Main Resource. I'm just trying to run a process when they SET it, but not when they UNSET it.
Last edited by Jaymer on Mon Mar 30, 2020 4:08 am, edited 1 time in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Why would a simple IF ... WAS CHANGED rule fail?
Apparently this has something to do with check a REFERENCE FIELD using WAS CHANGED.
I modified my rule: Now it evaluates... but incorrectly for what I need.
I physically changed the empty Reference ComboBox to a value - so ps_MainResource did in fact change, and I have the combo box set to SAVE FORM on Change. It saves, rule evaluates.
I'm missing something here.
I modified my rule: Now it evaluates... but incorrectly for what I need.
I physically changed the empty Reference ComboBox to a value - so ps_MainResource did in fact change, and I have the combo box set to SAVE FORM on Change. It saves, rule evaluates.
I'm missing something here.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Why would a simple IF ... WAS CHANGED rule fail?
never noticed this before... 5 diff rules failing -- all of them checking a Reference field for a CHANGE
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Why would a simple IF ... WAS CHANGED rule fail?
What AIM version you are running?
I tested IS DEFINED AND WAS CHANGED both... found no issues. The only difference was I test both conditions separately.
I tested IS DEFINED AND WAS CHANGED both... found no issues. The only difference was I test both conditions separately.
From,
Himanshu Jain
AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Himanshu Jain
AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Re: Why would a simple IF ... WAS CHANGED rule fail?
Latest Build 2721
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
this one works
I think we've all done this plenty of times.
this SHOULD work, like it does here in this different example: Very similar rule - this one is a Dynamic check.
The one that is failing is not.
this SHOULD work, like it does here in this different example: Very similar rule - this one is a Dynamic check.
The one that is failing is not.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: [SOLVED] Why would a simple IF ... WAS CHANGED rule fail
Issue can be see in the image above with 5 errors in the log.
The top one is the rule "LOCAL_KanBan"... its using TicketR.ps_MainResource
The other rules use TicketGroup.ps_MainResource
All of the "TicketGroup" rules are automatically sync'd by Aware to all Group members.
Since I had a LOCAL Rule that was ONLY for group member TicketR, I made the rule explicitly refer to TicketR - thats technically correct.
Aware must have some internal confusion when this is done - I changed them all to TicketR and it worked. Then changed all back to TicketGroup and it worked.
So I'll have to be more careful with my LOCAL rules so I don't mess up the internals.
The top one is the rule "LOCAL_KanBan"... its using TicketR.ps_MainResource
The other rules use TicketGroup.ps_MainResource
All of the "TicketGroup" rules are automatically sync'd by Aware to all Group members.
Since I had a LOCAL Rule that was ONLY for group member TicketR, I made the rule explicitly refer to TicketR - thats technically correct.
Aware must have some internal confusion when this is done - I changed them all to TicketR and it worked. Then changed all back to TicketGroup and it worked.
So I'll have to be more careful with my LOCAL rules so I don't mess up the internals.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 2399
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: [SOLVED] Why would a simple IF ... WAS CHANGED rule fail
Good work Jaymer.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....