Can you edit a conditional expression?

All I want to do is change the value from 74 to something else. I can see no easy way to actually do that.

I can insert a new expression or delete the current one, but how can I actually edit it if I've made a mistake or just want to tweak something? This is a really simple example and it's quick enough to delete and make a new one, but am I just missing something or can you not edit it once it's been created?

Yes, but you'll need to back out of that page: hit Done editing Expression, then possibly also Done with IF Expression THEN and whatever you need to do to get back to the Actions page. There, you'll see a Manage Conditions box. Click/tap into that, find the condition you want to edit, and edit it there--rather than trying in the expression itself (where you can really only create new ones or swap one existing/created condition out for another, though I suppose that's a way to accomplish a similar goal).

3 Likes

Okay, I found it. That's really not intuitive at all that you need to leave the screen that literally says

Editing: IF (Temperature of Office - Motion Sensor(74.4) is >= 70.0(T) [TRUE]) THEN

to get to where you can edit the actual condition. Especially since there is a button that says "Edit IF Expression THEN"

image

So you have to just know that there are 2 separate locations to edit the expression.

2 Likes

I think the important thing to recognise here is there is a difference between editing a expression and editing a condition.

The expression is "If( blah blah and/or blah blah)" then

blah blah is a condition of the expression. It may not be very intuitive, but it does make logical sense. The verbiage doesn't help it visually though.

1 Like

That might be true, but it's not really presented that way in the UI. I open the rule, click on the actions, then click on the specific action I want to edit. That opens the screen seen in the screenshot in my first post. From there, you can insert a new condition, you can delete a condition, so why is there not an edit condition? Why do I need to go back a screen? Also, the word "condition" is used nowhere on this screen, It just says

Editing: IF (Temperature of Office - Motion Sensor(74.4) is >= 70.0(T) [TRUE]) THEN

Which to me implies I am editing the whole expression, of which the condition is part of. Up until now, every time this has happened to me I have inserted a new condition and then deleted the old condition from this screen. If there is the option to add and delete a condition, but not edit, the logical conclusion most people will come to is that you can't edit conditions. Not that they should go look somewhere else for the ability to do this.

I am not debating that one bit. I agree that it probably could be explained better.

That said Conditions have always been handled independent of the If-Then expressions. I was just explaining what i believe the logic is behind it.

The best way I can relate to what you are asking is that it is like complaining about editing a fragment of a sentence. To ensure the sentence make sense the whole context needs to be considered. In the context of the rule the Condition is simply part of the If-Then expression. If( blah blah) Then doesn't mean anything without the condition within it. So you would need to modify that whole expression and not the Condition within it. Also when you setup If-Then expressions you actually select the Condition as well.

I get what you are saying and there may be UI changes that can be done to make it more intuitive, but it also makes complete sense as well.

Something being intuitive for use doesn't always mean it makes logical sense.

1 Like

Maybe @bravenel can find a creative way to link back to the condition editor from the edit expression page in RM. (Without thinking this through too much: maybe each condition in the display could be a link to a page that edits that condition? Or just a link somewhere to the page itself?)

If not, now you at least know the difference and the history behind it. :smiley:

Aargh, what a mess that would be, both to implement and in the UI. Conditions themselves can be fairly complex, and adding another layer of complexity to editing an expression is not a step in the right direction. These sort of things require obtaining some degree of familiarity with RM, and without that, further complicating the UI isn't really going to help anyone. Once that familiarity is obtained, @mavrrick58's comments are on point.

Certainly, RM's UI leaves a lot to be desired, but there is also a depth of complexity to arbitrarily nested conditional expressions that is never going to just be easy.

4 Likes