Colorizing a record?

I have used the following formula in Pan 6 to create alternating white and grey records for easier viewing:

Field greybox FormulaFill ?(int(seq()/2)=seq()/2,“greybox”,"")

This works in Pan X, but it does not print this way on a form like it did in Pan 6. All rows are white on the form while they alternate white and grey on the data sheet. Does anyone know how to make it print this way on a form in Pan X?

I would love to have the ability to adjust the font size of the datasheet.

I read it was very difficult for you to add the changing of font size in the database. So, thanks a lot for doing that, Jim. Excellent!

Now if we can change the color and style of individual records, that would be very helpful also. Here you can see why:

Thanks, Tom Q

Has there been any movement on this over the last year?

You can now change text size with Window: Text size:
No colors anymore

Hello Everybody,

I just noted tomq’s response above, and I hope he doesn’t speak for the Pan X community. The loss of color in the Data Sheet is a MAJOR deficiency in Pan X - a deficiency that I had hoped would be addressed once Jim got some time to concentrate on it. Losing the ability to color Data Sheet records is like losing a sense (such as hearing, or sight) and imagining that things are not so different from before. Or eliminating a 3rd dimension, and working in a 2-dimension plane.

Imported records (using a variable) from several different databases can be distinguished from one another by coloring them differently, so you know where each record came from and whether adjustments need to be made. And since you’re already in the Data Sheet window, the adjustments can be done directly.

And that is just one minor trivial example of the power of this feature. Given the intellectual heft of contributors to this forum, I can’t believe this isn’t widely used in complex (or even simple) macros.

The Text List object is not remotely a comparable option to this loss. The Text List object requires actual programming to set up properly, instead of having built-in commands from a menu, which the Macro Recorder can write for you. Not to mention the help colored records can give to tired old eyes like mine, when looking over and analyzing the Data Sheet records.

Jim, can you let the community know, via the forum, at least a rough estimate of when you will implement this feature. We all know you have to set priorities on what you work on first, but my 2 cents is that this one is pretty important.

Best regards,
Vic

I already commented on this back in Oct 2016 in this thread. Please scroll up and read my post on this.

Here is a workaround for color coding records. I use Apple Emojis as the various colored flags to identify groups of records. The down side is that the flag field has to be in a visible field to be effective and the colored emojis are rather limited to color variations. Of course you could use any of the emojis in whatever grouping you come up with. Apple Emojis are the only thing that will show color in the data sheet at the moment. You could copy these emojis just as they are to the Choices panel for your flag field. They each have to be separated by a space as they are shown below.

⚫️ ⚪️ 🔴 🔵

Here is a screenshot showing what it looks like in action:

1 Like

Hi Gary,

That is a great insight. It will certainly be a possible workaround. I will explore it more. Thanks for the replay.

From Jim’s response (from earlier), it looks like adding colored records will entail a major change to the database file format. Wow. So I guess this feature is not coming back. That’s really too bad, but you can’t have everything you want in life. I think if Jim had asked the forum prior to making that decision, he would have received many positive requests for its continuation. But, “water over the dam”.

Regards,
Vic

FWIW: I have never used color in the data sheet.

Hello Gary,

Just one quick folllow-up question.

Once the field is set up as choices with emojis, the proper emoji can be selected with the choice palette manually. That is, if you add a record, you can select the proper choice.

But how do you write a macro for the proper choice? For example, how can you instruct Panorama in a macro to place the FIRST (or SECOND, etc.) choice in the field? This would be easy to do for text choices. But emojis??

Regards,
Vic

Vic, emojis are text and you would procedurally put them into the Flag field (or what ever the field is named) the same way you would enter any other text into a field cell.

Flag="🔴"

For that matter the field certainly does not have to be a choice field at all - just a normal text field.

Further followup, you could apply this to multiple records at once, for example:

field Flag
select Price < 0
formulafill "🔴"

Of course the formula could be whatever you want.

You’re guess is correct, and good riddance. It was a horrible feature. It only allowed a selection of 7 crummy colors. As soon as you edited the data, the color/highlight would disappear and have to be re-issued.

What I would like to do eventually is add a feature that allowed any color or style to be applied automatically based on attributes of the data – for example display any negative value in red automatically. I’m haven’t worked out the details of how that would be done, and there are much higher priorities, number one is the server version. In the meantime, Gary’s solution (which I think he has mentioned before) is an excellent substitute.

1 Like

Jim,

You’re too censorious of your own work. It might not have been perfect, but it was a great feature. Easily used, and a powerful adjunct to an already powerful program. Apparently not many people realized it. Oh well, too late for them now.

One point you might want to correct. I used Gary’s suggestion, and then used the macro recorder to follow my steps to see how to program the emoji selection. I got an error message.

When the macro recorder prints the choice selection, it wrote:

Flag = (picture of the emoji)

It did not place the emoji picture within quotes, and so the macro failed. I didn’t realize you could surround a picture with quotes, prompting my follow-up question. But the macro recorder does not enclose ANY choice with quotes, so the macro will always fail.

You will probably want to edit the macro recorder code so that it places the selected choice within quotes.

Slowly, but surely, things are getting resolved.

Regards,
Vic

I just learned something new about this forum. If you put an emoji in ordinary text, the forum replaces it with a picture of the emoji, but if you put it in code that is preceded by 4 spaces, it remains a character of text.

This is a picture “:red_circle:

and this is a character "🔴"

I edited Gary and Jim’s posts so that they are now characters. You should be able to copy and paste into your procedures.

The easiest way to write Emoji characters in the data sheet comes with macOS. Use the menu item Edit > Emoji & Symbols (or press ctrl-cmd-space). You can select any emoji character — like these ones:

✅ ❌ ❤️ 💛 💚 

It would be nice if some functions like asc( and chr( were compatible with emoji characters. The documentation says it asc( - despite of the name - is compatible with Unicode, but it does not seem to work with emoji characters.

Unicode characters with values above 65535 are encoded as surrogate pairs.

Panorama’s various string handling functions treat each member of the pair as a separate character.


Revision by Jim Rea 12/22/2018 – Due to the release of Panorama X 10.1.2 on 11/15/2018, Dave’s post is now out of date. The chr( function now handles emoji’s as a single character, instead of as a pair. There are also two new emoji specific functions, expandemojis( and emojicheats(. (I’m leaving Dave’s post above for historical purposes, with this new addendum.)

Note: The asc( function still does not work with emojis, I don’t think it can work since internally the system handles emojis as a double character.

This would probably require an additional pane in the Properties panel of the data sheet. With that thought in mind I mocked up a model of what it might look like to have a Data Sheet Options pane in addition to the normal Field Properties pane. I took the liberty of including other options to more easily control the tool bar, scroll bars, window size and a toggle to turn alternate background colors on or off. Of course all these things are really simple in a virtual incarnation but immensely more involved if even doable in actually programing these features.

Noting that this is in no way urging adoption or pressing to have these things immediately implemented, it is only my own amusement to fill in a little extra time on a lazy Sunday morning. With that in mind, here is my rendition.

I’m very late to this discussion, but I’d like to add my vote for adding font and color controls to the Data Sheet. Most especially in some variation of what Jim was talking about: being able to make a Debit field red for example. Or having formula control over data within records and fields.

It’s a little frustrating to hear that since it couldn’t be done elegantly, it won’t be added at all. I get that it can be worked around in a form, but let’s remember that we’re not all heavy programmers and graphic layout in the forms is still a bit fiddly. The ability to control color and fonts widely in most other OSX software has been available for years. Yes, other features no doubt take priority over aesthetic features like color right now, but don’t underestimate the ability of well-designed and easy to use graphic controls to win over new users. Panorama is insanely powerful, and the more that can be done to harness that power easily, the more users there will be.

Peter

Dave,

On my system, I get the following results when using your example:

Do you have any idea why? I’m stumped. I’m very much interested in using this technique.

Eric