Forum Discussion
Hi AJ, thanks for replying. The issue is that there is no property of the Document item that has a "ID" . The id are just the Document item_number(screenshot below). I want the unique IDs, the value in <id> tag, to be displayed in the search grid. I don't want to change the current Data Source of the ID property. I want to add a new property, say GUID, that will show the unique id in the search grid.
Interesting! That's a new use case. I'd recommend:
Create a new property on Document called GUID.
Create an onAfterAdd server event which sets the GUID when a new document is created.
Attach the following method:
[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:176e2284-e941-45b6-9e39-c6ee21b38dc7:type=text&text=var%20inn%20%3D%20this.getInnovator%28%29%3B%0D%0Athis.setAction%28%22edit%22%29%3B%0D%0Athis.setProperty%28%22GUID%22%2Cthis.getID%28%29%29%3B%0D%0Athis.apply%28%29%3B%0D%0A%0D%0Areturn%20this%3B]
This will set the GUID for all Future documents. If you want to do it to existing ones you'd have to get them all in a method and loop through them. It's a one time operation to set the ID > GUID.
AJ
- Hargul_Sidhu2 years agoIdeator I
Thanks for the prompt reply AJ Sebastian Unfortunately, things don't work on my end.
I added the method but I don't get the ID in the GUID column in the search grid, screenshot below. Am I missing something?- asebastian2 years agoNew Member
It might be a case sensitivity issue in that instance. Your properties name is guid, and the label is GUID. In your method try changing it to lowercase and see if that helps?