Define a calculation field in the related table that combines the two fields with a tab character separating them.
Field1 & Char ( 9 ) & Field2
Then set up your tool tip to use list to list this field. I would think executeSQL() with a Tab character as the field separator would also produce the needed columns.
Either approach won't work if there is too much variation in the data from the first of the two fields as you can't specify a "tab stop".
An alternative maybe to use a popover to display this data in a portal. You'd have to click instead of hovering the mouse unless you had the right plug in, but other than that, it would give you much more control over the data displayed and it wouldn't vanish before you wanted to just because you barely moved the mouse.
Thanks. Yeah, adding the CHR(9) to the SQL made it look a lot nicer. I just added the header in text above that.
I liked your calculation field idea as well, but when trying it, the List function in the tooltip only displayed one record from the many table - whereas the SQL correctly displayed all of them. (I tried to use both the member table and the related payment_history table as the point of view for the calculation.)
Appreciate your reply as always. :)
If the list function only listed one value, something was wrong with the relationship. ESQL defines its own relationship so it would avoid that problem.
No idea. If, as I said earlier, I only include one field from the history table (like the timestamp of the payment), then the LIST function returns all the rows. But, the moment I include another field, like the amount, then it only returns one row. I tried creating the calculated field in both the parent and child tables just to be sure.
The relationship is simple: PK in member table (number) connected in the RG to the "FK" (number) in the payment history table corresponding to the PK in the parent table.
Not sure what could be wrong with the relationship, but would welcome any ideas.
If list worked with a single field to list multiple items, it's not your relationship. I've used this method in a number of contexts so defining this calculation field in the child table does work. Perhaps you referred to the wrong table occurrence name when you set up list to refer to the calculation field in the child table.
I "think" what happened is that after creating the calculation field I must have forgotten to include the LIST() function.
It's working this morning. :)
Thanks Phil for the additional follow up.
I'm still not quite used to having to create 'helper fields' like this, but they're a nice solution.
In time many people discovered great uses for Tool Tips...
Now we have the Popover.
Consider using it since you can use a portal on it and position the data where you want. Use the new menu bar in 15 to create the popover.
Here's a quicky example:
Sadly I hadn't considered doing this for my dashboard and used sliding instead which lead to a lot of pain...
A popover was suggested two years ago in the very first post.
How about colorizing the dates...
I'll bet I suggested it...
1 of 1 people found this helpful
List ( related::field )
get values from one field of all related records.
If you use 2 parameters as
List ( related::field1 ; related::field2 )
get values from current record in current table, then the values are got from 1st related record.
You need making a calculation field (can be unstored on use case) in related table as
field1 & Char(9) & field2
then use it as 1 parameter.
List ( related::calculated )
and worthy of repeating!