Jump to content

Apply specific text color to values using List command


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

Recommended Posts

Greetings, all.

This one's tricky: I'm using the List function in a parent table ("PARENT") field to create a comma-delimited list from a child table ("ESU7_DEPT_CONTACT_EARLY_CHILDHOOD" ) using this command:

Substitute ( List ( ESU7_DEPT_CONTACT_EARLY_CHILDHOOD::NameFL__lxt ) ; "¶" ; ", " )

It dutifully lists all names from the child table, separated by a comma. However, I'd like the child table names--that are related to grandchildren tables--to be highlighted in red in the aforementioned List function so the output would look like this:

John Smith, Jane Doe, A Blivet, Al Capone, Gomez Addams

Is that doable? TIA for your help.

Rich

Edited by WF7A
Better wording
Link to comment
Share on other sites

4 minutes ago, WF7A said:

I'd like the child table names--that are related to grandchildren tables--to be highlighted in red

I wasn't able to decipher what that means. What exactly determines which names should be highlighted?

BTW, what is the purpose of creating such list? Could it be produced on-demand using a script?

 

Link to comment
Share on other sites

Sorry 'bout that--here's the section of the relationship graph that I'm working on. (I know you'd rather have the database uploaded here for examination, but I signed an NDA so I don't think it would be proper to post it here.). ...and I apologize for the wrong nomenclature--they're not grandchild tables, but a table related to the child tables.

As for the purpose, it's so managers can see which individuals belong to a specific department of an organization; if they do, the name should be highlighted in red. The original list is in an Excel spreadsheet, but I have some latitude as to how it can appear in FMP.

...and sure, it can be scripted. (I wouldn't ask for someone to script it for me, but if I had some guidance I could wing it.)

Screen Shot 2021-09-22 at 10.42.49 AM.png

Edited by WF7A
Better wording
Link to comment
Share on other sites

12 minutes ago, WF7A said:

so managers can see which individuals belong to a specific department of an organization;

I am afraid this is not getting me any further. How can one determine that an individual belongs to a specific department? Is the department stored in the individual's record? And what determines which department is the "specific" one?

Instead of a cryptic RG, let's use some meaningful names for the tables involved in this - such as Contacts, Departments and ?? for the "parent" table.

---
BTW, from your RG one gets the impression that some of the relationships are using a person's name as the matchfield; that's usually a very poor choice. Names can change.

 

Link to comment
Share on other sites

Thanks for the great input--I'll take you up on it. I was using names as keys because the original coder didn't create unique key fields; I've added them. (FMP does that automatically now when tables are created--a VERY good thing.)

The "problem" with color-assigned text went away after I talked to one of the department heads: they were planning to make the aforementioned lists, then print them on a black and white printer; I then commented that color text in black and white printouts is a bad idea, so I'll affix footnoted asterisks to the specific names--that's much easier to do calculation-wise.

Thanks again.

Edited by WF7A
Link to comment
Share on other sites

This topic is 917 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.