Jump to content

Font Color to be Red when values displayed in 2nd table


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

Recommended Posts

Table1=t1 field a and b

Table2=t2 field c and d.

I was trying something like:

Case(C=a and d=b;TextColor(text;RGB(255;0;0))).

If any of the values in a AND B were displayed in the t2 fields C and D then the font colour of those displayed only would show RED in table 1.

But it does not work.

Any idea's what i am not doing ?

Corey....

Link to comment
Share on other sites

Take a look at the graph above, to make the first relation lock are both values bound to be in the same record, while the next isn't so strict. To examine if a match a relation away exists do use the IsValid( function... this means that the updating autoenter in each of your field needs to look like this - lets take the first one:

Case(IsValid ( reference::c_field ) and IsValid ( reference 2::_field );TextColor ( a_field ; RGB ( 255 ; 0 ; 0 ) );a_field)

--sd

Billede_1.jpg

Link to comment
Share on other sites

Firstly, Thanks for the reply.

I have related the fields as the strict type in your example. And used the IsValid calculation in the case function, but i get nothing.(No change in color)

Im using it in a number field with 43 repetitions and set it as a Calculated Value.

Is that correct?

Corey....

Edited by Guest
Link to comment
Share on other sites

Im using it in a number field with 43 repetitions and set it as a Calculated Value.

You mean two repeating fields one for a and one for b? Well repeating fields works as multilinekeys so if one of the lines lines fits the condition should all get red ...however I must caution you since you declare your skills to be "beginner" should you refrain from the use of repeating fields for quite a while ....since they tend to get in the way for a better grip on relational approaches ...and when it comes to it does the above quotation make much sense either.

What you probably woul like to do is to have a list where you enter data a set of a and b ...where you wish to highlite or redden the ones already in the other table.

This isn't a task particular easy to implement with repeating fields (I'm not saying that crafty developers can't but it's going to be quite an efford) - when a portal showing each record as it's termed in relaional designs JUST are up to it. Opposed to where fields holding more than one value which is considered a violation of 1NF.

You have quite sparsingly touched what the entire purpose is supposed to deal with ...so I'm merely guessing that the red stuff could repesent occupied stuff say in a rentalshop or such, but another way of solving such issues is make strainer lists to filter out availiable stuff via multicriteria realtions and and the non equal relation type and carefull use of the Copy All Records or ValueListItems.

I think you should give this upload an inspection!

...It's an file stemming from Don Wielands site, but I needed to hack it to prevent the tampering with the clipboard, this is an only slight slowdown from the original one - But it's a bad developer habit to jeopardize the users eventual content in the clipboard.

--sd

Link to comment
Share on other sites

Thanks again for the reply.

The linked file was great but went straight over my untrained fm head.

What i am purposing is the following

I have in full:

Table 1= layout for conveyor belt inspections.

Among other fields it have a 43 repeating field that displays each individual Lengthof belt.

It also has a site field(Owner of the belt's name). And a Unique Roll ID Number.

The site field is the field i use to be the relationship field for each table.

Table 2 = A layout that displays various fields to display what length of belt comes from what roll ID to make up 1 completed roll to a site specified length.

Table 3 = A summary of info to the site of what stock lengths are remaining, and what lengths/rolls have been sent back etc.

My aim, which is mostly done is to have conditional value lists in the Table 2. That when the matching site is selected, the Unique roll ID's from Table 1 are ONLY shown in a value list for that site. DONE.

The the field under that in Table 2, to display ONLY the Lengths of belt that were in that Roll ID. Semi-Done. But am happy enough with that.

The object now is to have ALL Lengths that have been USED in a Table 2 layout to now be, Changed to a RED FONT to display at a glance on Table 1, that that particular Length has been USED.

The reason that i needed 2 Fields(Length & Roll ID) related to this is that it is quite likely that 2 ID Rolls will have a same Length. So teach Length needs to be Related to that particular ID Roll.

I have attached what i have, it may not be a Developers dream, but hey it work for me so far, except for this RED Text endevour.

Corey....

Link to comment
Share on other sites

Lengths that have been USED in a Table 2 layout to now be, Changed to a RED FONT to display at a glance on Table 1, that that particular Length has been USED.

Which could have been a change into a strike thru font or whatever actually more or less the scenario in the upload which is a cheat - strictly by the book is a many to many structure going to hav a join table which your solution is a bit short of too.

I could think up a fix using PatternCount( and ValueListItems( but it would be the same as giving booze to an alcoholic or let a your 3 year old play with a chainsaw at full throttle next to your favorite furniture - it's time to roll up the sleeves and learn about relational designs.

This is a task best performed with propper relations - not quick fixes and workarounds.

--sd

Link to comment
Share on other sites

I did not even think of a Strike - Through Font.

That would make sense even more than a change in color of the font.

Is this an easier task to do than a font color change or still a bit detailed to do?

Once i can have this solved, i then need to from Table 2, have a list of each belt width on hand that is not used in a refurbished roll.

Corey....

Link to comment
Share on other sites

Is this an easier task to do than a font color change or still a bit detailed to do?

Perhaps even easier:

http://www.filemaker.com/help/FunctionsRef-393.html

Once i can have this solved, i then need to from Table 2, have a list of each belt width on hand that is not used in a refurbished

I'm not agreeing here, because being used is just an attribute to the same data, which in essense is does both foreignKeys have values or not. The other way around so you have to consult data a relation away.

Take a look at this template and watch the arrows changing direction in first portal as well as utilizing only one table at all but two TO's....

--sd

Link to comment
Share on other sites

This topic is 5653 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
 Share

×
×
  • Create New...

Important Information

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