Jed69 Posted October 29, 2010 Posted October 29, 2010 Hi I have a lot of fields to create conditional formatting for and their formatting is based on a second field, a different field for each one. All of the fields follow the same format. EG. the displayed field that has the conditional formatting on is JA1 and the field that determines its formatting is JA1 Copy. To save a huge amount of time I would like to set all the fields at once determining the referenced field by formula ie JA1 + copy. Is this possible? Many thanks John
bcooney Posted October 29, 2010 Posted October 29, 2010 I know you'd prefer a direct answer, but it seems to me that you've gone off in a very bad direction. JA1 and JA1 Copy for field names raises a huge red flag. That being said, perhaps GetFieldName ( self ) & " Copy" would be helpful.
mleering Posted October 29, 2010 Posted October 29, 2010 Hi John; If I understand your question properly, then this should indeed be possible. What I understood is that you have a series of fields: ex. Ja1 Ja2 Ja3 Ja4 ... each one of those fields needs to be conditionally formatted based on the value of a field with a similar name. ex. Ja1 Copy Ja2 Copy Ja3 Copy Ja4 Copy For a simple example of how this can be accomplished, I have assumed that the value of the "Copy" fields is a binary result. The formula that I used within a conditional formatting calculation is as follows: Let ( [ _thisFieldName = GetFieldName ( Self ); _correspondingFieldName = _thisFieldName & " Copy" ]; GetField ( _correspondingFieldName ) ) This will essentially, return the value of the copy field
Jed69 Posted December 2, 2010 Author Posted December 2, 2010 Thank you both. This has put me on the right track. However I have changed slightly how I am relating the data. What I need to do now is to make a date field relate to a field name. The date could be 2010/7/29 and I need it to become JL72010. I realise that I would need to use the left, middle and right functions but not sure how to do this as the day and month could be one or two digits and the reference date is a variable? Can anyone point me in the right direction. Many thanks John
comment Posted December 2, 2010 Posted December 2, 2010 The date could be 2010/7/29 and I need it to become JL72010. This is not conditional formatting. You need a calculation field, e.g. = "JL" & Month ( YourDate ) & Year ( YourDate ) What I need to do now is to make a date field relate to a field name. That's not a good way. Data should be stored in fields - not in field names. If you have many dates that need this conversion, you should put them in separate RECORDS in a related table, with fields for date, type and parent's ID.
Recommended Posts
This topic is 5451 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