I’m having a little trouble getting this to work, trying to evaluate two values and result in a rule violation but accept N/A as the only acceptable value outside of the values equaling.
here is what i have so far.
x = value1
y = value2
if x == "N/A" or x == y:
Rule.Violated = False
else:
Rule.Violated = True
Rule.Violated is a built in function in the system I’m using to return an error message one true and not returning one if the rule violation is false, i dont think the result of the if statement matters to figuring out the logic though, but if you need more info let me know.
I figure it out, thanks to those who helped. My problem was with data types, ill be sure to mention the data types next time i have a question, but for those who are curious, here is the answer.
had to use a function told to me by the developer to get the field as a string and compare the strings. Previously was trying to compare date time to a string, bonehead move on my part. FormSet is also a built in reference in our system that i was trying to avoid having to use anything other than straight python to ask the question.