04-16-2020, 08:46 PM
(This post was last modified: 04-16-2020, 08:46 PM by remkonoteboom.)
The display that defines the Expression Value is the following (in src/tactic/ui/table/expression_element_wdg.py
I think the problem you are facing is due to line 1151. What you want it to be is the following:
Can you see if this change fixes your problem?
As I previously mentioned, I really haven't used this widget that much. The difference is the current definition uses an absolute expression and the change turns it into a relative one. I don't know which is better because I haven't really had any real world use cases.
Code:
1141 def get_display(self):
1142
1143 sobject = self.get_current_sobject()
1144 if sobject.is_insert():
1145 return
1146
1147 value = self.get_value()
1148
1149 # assume the value is an expression
1150 try:
1151 value = Search.eval(value)
1152 except Exception as e:
1153 print(e.message)
1154 value = "Error [%s]" % value
1155
1156 return "%s" % value
1157
I think the problem you are facing is due to line 1151. What you want it to be is the following:
Code:
1151 value = Search.eval(value, sobject)
Can you see if this change fixes your problem?
As I previously mentioned, I really haven't used this widget that much. The difference is the current definition uses an absolute expression and the change turns it into a relative one. I don't know which is better because I haven't really had any real world use cases.