If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#52275 by ddumas
Thu Dec 05, 2019 8:46 pm
I have the following BOs:

Member (all members subscribed)
FirstName, LastName, etc

MemberBlocks (list if members you do not want to receive any messages from)
Member (type=Member, allow multiple, owned by Member, default widget= grid)
BlockedMember (type=Member, not multiple, peer, default widget=combobox)
DateBlocked (date)
BlockReason (why you wish to block this member from sending you messages)

In my Member main form, I have a form section called MemberBlocks, which I add , edit Blocked Members. It's working.

However, when I navigate to that section, It works, but It only displays the ID of the BlockedMember in the grid . I see no way to display the BlockedMember's first and last name. See attachment. So, I need to displayed the related child records's First and Last name in the grid. When I press edit to edit, or add to add a new BlockedMember, the add / edit forms work fine, and I can see the Member, and BlockedMember first and last name.

So, all the association is working fine.

Dave
Attachments
SelfReferencing.PNG
SelfReferencing.PNG (11.48 KiB) Viewed 465 times
#52279 by Jaymer
Thu Dec 05, 2019 9:59 pm
you just need to add Shortcuts to the First/Last name field. then they'll show up in the list of fields to add to the Query(grid)

also, i would hope you'd start you're adventure naming fields 'correctly' (although that highly debatable)

member BO:
Fname
Lname
field 3
field 4
pm_BlockedMembers <---- indicates its a peer multiple, just by its name
ps_Company <--- peer single reference to "owner" Company record, not just Company (which could easily be confused as a string field for Company Name)


when you use "MemberBlocks", its like, is that a verb? is it a list? If its boolean, then it'd be MemberBlocksYN so you can tell anywhere down in code. but if its pm_MemberBlocks then you know its a reference list.

like i said, this is debatable - and Vlad doesn't ascribe to this, or all the teaching apps would be redone to show this strategy. So people (like u) don't get this when they begin and go down 1 path when many/some of us "pros" go down a different path. Then, when an experienced person has to step in to debug/help/continue an app, all the fields are named "wrong" and you can't tell "down in the bowels" what type of field you're dealing with because its just named "Invoices" instead of pm_Invoices (which says a lot just in the name).
#52280 by PointsWell
Thu Dec 05, 2019 10:11 pm
Jaymer wrote:you just need to add Shortcuts to the First/Last name field. then they'll show up in the list of fields to add to the Query(grid)


On your MemberBlocks BO create a new attribute of type Shortcut. When you do this a field will become available immediately below the attribute type. Enter the path to the attribute that you want to show in the form:
Code: Select allpsMember.Name

Where psMember is the attribute on MemberBlock that relates to your Member BO.

As Jaymer says you can then use that Shortcut attribute on your grids. If you choose to make your grid editable in line then you use can use the Shortcut as your drop down. If you do this though, you can only use one depth of shortcut for inline edits, though you can reference multiple depths of relationships for just viewing.
#52283 by eagles9999
Fri Dec 06, 2019 12:47 am
ddumas wrote: I will also look at naming - it is indeed very important.

Dave


Hence the presentation I sent you the link for yesterday Dave. ;-)

Who is online

Users browsing this forum: No registered users and 20 guests