the expression you posted: table::Field = 1, will return True (1) if the field stores the number 1 and False ( 0 ) if it does not.
You could use an if statement, If ( table::Field = 1 ; True ; False ), but this will give you exactly the same result from a more complicated expression.
So, the good news is, I'm not a complet idiot.
The bad news is it doesn't seem to work :P
The table i'm trying to "check" is a jointable called AssignmentTasks, it has three columns:
AssignmentID, TaskID and Completed.
Every time a new dataentry is created in the Assignment table, a data entry in the AssignmentTasks-table is created for each task. The completed is set to 0. I need to be able to see if a task is completed or not for various reasons (a "ToDo"-list for example)
I try to use
AssignmentsTasks::Completed = 0
in order to change the textcolor using conditional formatting, but nothing happens. Previously I used this (working) code:
not IsEmpty ( FilterValues ( Egenvärde ; List ( AssignmentsTasks::TaskID ) ) )
Egenvärde is from the swedish version it translates to
back then, It was checking if there were any data-entries available at all in the join-table, whenever a assignmentID and TaskId was in the table the task was concidered done.
Context makes a difference here.
My previous post was based on the assumption that the values being compared were all part of the same table. If you use an expression such as:
RelatedTable::Field = 1
From the context of your parent table, then you are checking only the first related record (the first row in your portal)--not all the records.
The list function pulls all the related values into a return separated list, which is why it works.
I don't see why your conditional format expression: AssignmentsTasks::Completed = 0 Doesn't work. If this is applied directly to a field from the AssignmentsTasks table, it should work.
Oh, I see, sort of. The conditional formatting is in a portal... does that make any difference?
Hrm I'm really close now. Everything accept the actual conditional formatting seems to be working. (I can check and uncheck all the boxes properly) and the completed field is changing accordingly.
the conditional formatting however, seems to relate to the first dataentry for all the boxes (if i check the first box in the portal of all the boxes get checked, but if I check any of the other boxes, nothing happens!
"if i check the first box in the portal of all the boxes get checked, but if I check any of the other boxes, nothing happens!"
I'm afraid you lot me there. What boxes are you talking about and what do they have to do with any conditional formatting (which changes text style, text color or fill color) have to do with this?