bcolburn Posted October 14, 2011 Posted October 14, 2011 I am trying to code conditional formatting based on whether or not a single value in a checkbox set is checked (regardless of the other values). I found this FM Support answer that says clicking a single box returns results based only on that checkbox, but when I write a calculation, this is not the case. For example, I have a field with four possible values. If I use the calculation [ table::field = "value 1"] to run conditional formatting on a related field, it is only applied when "value 1" is checked and all other checkboxes are empty. I want it to apply formatting independent of other checkbox data. What am I doing wrong? Thanks for your help!
comment Posted October 14, 2011 Posted October 14, 2011 I am trying to code conditional formatting based on whether or not a single value in a checkbox set is checked (regardless of the other values). Try = not IsEmpty ( FilterValues ( "single value" ; CheckboxField ) ) I found this FM Support answer This article is about performing a find and irrelevant to your question.
FMPierce Posted October 17, 2011 Posted October 17, 2011 Or you could make a calc like this. PatternCount ( CheckboxField ; "single value") > 0
comment Posted October 17, 2011 Posted October 17, 2011 Or you could make a calc like this. PatternCount ( CheckboxField ; "single value") > 0 No, that's not a good idea, because it searches for a string - and the string may be contained in another value.
bcooney Posted October 17, 2011 Posted October 17, 2011 I'd like to suggest NOT using a checkbox set. I rarely do. Perhaps these should be related child records? Reporting, finding, etc., on checkbox sets is more difficult than doing so from a child table.
comment Posted October 17, 2011 Posted October 17, 2011 I'd like to suggest NOT using a checkbox set. Hmm.. wouldn't you want to know what this is about, before making such a radical suggestion? I can't see nothing inherently wrong with checkboxes as such.
bcooney Posted October 17, 2011 Posted October 17, 2011 I did say "suggest" and "perhaps." I don't think it's radical. I think that beginners use checkbox sets rather than child tables all the time, and live to regret it.
Vaughan Posted October 17, 2011 Posted October 17, 2011 Yes I know what you mean Barbara... see attached file. Checkbox_Set_Regrets.fp7.zip
Aussie John Posted October 20, 2011 Posted October 20, 2011 Without wishing to hijack the OP is there an easy way spit the checkbox values into a child records? My first thought is to run a loop script and getvalue. My other thought (if it would work) would be to parse the checkbox field to a repeating field (using a recursive custom function?) and then import using the splitting repeating fields option.
comment Posted October 20, 2011 Posted October 20, 2011 Both would work. parse the checkbox field to a repeating field (using a recursive custom function?) No custom function is necessary; use GetValue () with Get ( CalculationRepetitionNumber ).
Recommended Posts
This topic is 5071 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now