Jump to content
Server Maintenance This Week. ×

Referenced Field Name Bassed on Formula


This topic is 4900 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 4900 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.