'Determine'

def cmdFirstStage(self, conn, request):

    try:
        session = request.getTagAttr('command', 'sessionid')
    except:
        session = None
    if (session == None):
        session = self.getSessionID()
        self.sessions[session] = {'jid': request.getFrom(), 'actions': {'cancel': self.cmdCancel, 'next': self.cmdSecondStage, 'execute': self.cmdSecondStage}, 'data': {'type': None}}
    reply = request.buildReply('result')
    form = DataForm(title='Select    type    of    operation', data=['Use    the    combobox    to    select    the    type    of    calculation    you    would    like    to    do,    then    click    Next', DataField(name='calctype', desc='Calculation    Type', value=self.sessions[session]['data']['type'], options=[['circlediameter', 'Calculate    the    Diameter    of    a    circle'], ['circlearea', 'Calculate    the    area    of    a    circle']], typ='list-single', required=1)])
    replypayload = [Node('actions', attrs={'execute': 'next'}, payload=[Node('next')]), form]
    reply.addChild(name='command', namespace=NS_COMMANDS, attrs={'node': request.getTagAttr('command', 'node'), 'sessionid': session, 'status': 'executing'}, payload=replypayload)
    self._owner.send(reply)
    raise NodeProcessed
