Reputation: 95
So the idea is to assign an icon to a Window control in the Grid control of a form (PurchTable), depending on whether a record has a document attached to it.
I use a select statement to check DocuRef if there is match between RefRecId and current RecId.
So the question is, how do I assign a different icon to each line? Can't really figure it out :/
Upvotes: 3
Views: 1662
Reputation: 5107
I'm guessing you wrote a display method similar to method showDocHandIcon on table InventTestGroupMember. In that case, you need to return an icon resource number depending on some data of your current line. So for example your lines contain an enum field and the enum has three values 1, 2 and 3 and for values 1 and 2 you want to return icon 1 and for value 3 you want to return icon 2.
Btw, you wrote that you check if there is a match between RefRecId and RecId. Please consider also checking refDataAreaId and refTableId, since the RefRecId may not be unique in table DocuRef.
Upvotes: 2