DISPLAYLIST / VALUELIST

160 views
Skip to first unread message

Roberto

unread,
Jun 22, 2016, 10:18:18 AM6/22/16
to Caché, Ensemble, DeepSee
Hello everyone,

Is there a way to retrieve the values and displays of a property?

Like below:

/// The current approval status
/// 0=Not Approved, 1=Approved, 2=Waiting for Approval, Null is valid and Approval not applicable
Property ApprovalStatus As %Integer(DISPLAYLIST = ",Not Approved,Approved,Waiting for Approval", VALUELIST = ",0,1,2");


Thanks.

-Roberto

Roberto

unread,
Jun 22, 2016, 10:34:05 AM6/22/16
to Caché, Ensemble, DeepSee
I figured it out looking at the documentation.

Here it is if anyone is looking to do this also:

Set cdef=##class(%Library.ClassDefinition).%OpenId("db.Provider")
Set count=cdef.Properties.Count()
For i=1:1:count {
Set fieldname=cdef.Properties.GetAt(i).Name
If (fieldname="ApprovalStatus") {
Set tempvar=cdef.Properties.GetAt(i)
Set parameters=tempvar.Parameters
parameters.GetAt("DISPLAYLIST"),!
parameters.GetAt("VALUELIST"),!
}
}

-Roberto

Brendan Bannon

unread,
Jun 22, 2016, 10:40:26 AM6/22/16
to intersystems...@googlegroups.com

If you want to find all the Properties in a namespace that have a DISPLAYLIST you can run this query

 

SELECT  Parent,Name, Parameters FROM %Dictionary.CompiledProperty

WHERE FOR SOME %ELEMENT(Parameters) (%VALUE IS NOT NULL and %KEY = 'DISPLAYLIST')

 

I was not able to isolate the display list so the output is not very pretty.

 

Brendan

--
--
Caché, Ensemble, DeepSee

---
You received this message because you are subscribed to the Google Groups "Caché, Ensemble, DeepSee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intersystems-publi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages