cancel
Showing results for 
Search instead for 
Did you mean: 

Enumerations

SOLVED
Occasional Contributor

Enumerations

I am trying to validate enumerations but getting an error(null value) though I have created a map 'kind'. How to resolve

 

 

//reading the values from a response which has the output like 1,2,3
def Brep=slurpB.Message.ReturnRows.e.DocPrintBypassPrintSwitch.text()

 

//created a map for enumeartions

def kind=[ '1' : 'FormatReports', '2':'AllReports', '3': 'Error']

 

//logging the enumerated value
Brept=kind.Brep
log.info Brept

Output :Null

Expected : enumerated values

 

What should be done to get the enumerated value 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Enumerations

Hi,

 

You need to use

 

Brept = kind.get( Brep )

instead of

 

Brept = kind.Brep


If my answer helped please click on the 'Accept as Solution' button.

View solution in original post

2 REPLIES 2
Highlighted
Community Hero

Re: Enumerations

Question is unclear and only partial data available to comment.


Regards,
Rao.
Highlighted
Community Hero

Re: Enumerations

Hi,

 

You need to use

 

Brept = kind.get( Brep )

instead of

 

Brept = kind.Brep


If my answer helped please click on the 'Accept as Solution' button.

View solution in original post