PDA

View Full Version : Finding a users name


Bruce
10-03-2002, 12:19 PM
What would I add to this command line (see attachment) to make the %UserName% = Dialog.GetInformation ("User Information","What is your name?") box come back up if the user hit cancle? For that matter... how about another dialog box that states "You must enter your name pin head before we can continue" with an OK button then back to ","What is your name?".

Thx all

Bruce

Bruce
10-03-2002, 02:59 PM
Oops here it is

12411-Commands.jpg (http://www.indigorose.com/ubbthreads/uploads/12411-Commands.jpg)

Corey
10-03-2002, 03:13 PM
I realize this might not be what you want to hear but users rarely fancy such customization. In fact I read a few communications studies from Harvard Research a while back which confirmed that usually people find it uncomfortable, with the exception of small kids.

I know if I open an app which enforces some sort of info gathering like that I just close it because it signals to me that this app is not going to give me what I want quickly without a bunch of hassle. If an app called me a pinhead I certainly would set it aside permanently...

Just 2 more cents...

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

Bruce
10-03-2002, 03:56 PM
LOL the pin head was a joke... (You knew that) This information must be gathered to be used later on the test that I'm building for a city agency. The information will be used to identify each employee. The CD will only be used within their office (this was their idea not mine). But I appreciate your insight.

Bruce

Corey
10-03-2002, 05:07 PM
On a test or exam it would be perfectly acceptable, I thought you were just doing a presentation...

Why not just use an edit field and then check it for null value when they press the button and spark a message box saying "info missing" if it's null...

Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)

Derek
10-03-2002, 05:12 PM
Something like this may work:
<font color=green>
<IR_ACTIONS_LIST>
<Action name="LABEL">
<Type>208</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Label>BEGIN</Label>
</Action>
<Action name="Get Information">
<Type>136</Type>
<Function>0</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<DialogTitle>User Information</DialogTitle>
<FieldTitle>Please enter your name:</FieldTitle>
<DefaultText/>
<BrowseType>0</BrowseType>
<Mask>0</Mask>
<Variable>%UserName%</Variable>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%UserName% = CANCEL</Condition>
</Action>
<Action name="Message Box">
<Type>5</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<DialogTitle>User Information</DialogTitle>
<DialogMessage>Your name is required for this test, pin head</DialogMessage>
<Icon>1</Icon>
<Variable>%Result%</Variable>
<DialogType>0</DialogType>
<DefaultButton>0</DefaultButton>
</Action>
<Action name="GOTO">
<Type>209</Type>
<Function>1</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Label>BEGIN</Label>
</Action>
<Action name="ELSE">
<Type>206</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="IF">
<Type>200</Type>
<Function>1</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Condition>%UserName% = ""</Condition>
</Action>
<Action name="Message Box">
<Type>5</Type>
<Function>0</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<DialogTitle>Title</DialogTitle>
<DialogMessage>no text was entered</DialogMessage>
<Icon>3</Icon>
<Variable>%Result%</Variable>
<DialogType>0</DialogType>
<DefaultButton>0</DefaultButton>
</Action>
<Action name="GOTO">
<Type>209</Type>
<Function>1</Function>
<DTIndentLevel>2</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<Label>BEGIN</Label>
</Action>
<Action name="END IF">
<Type>201</Type>
<Function>1</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
<Action name="Timed Message">
<Type>52</Type>
<Function>0</Function>
<DTIndentLevel>1</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
<DialogMessage>Set the Actions here if a name was entered</DialogMessage>
<Seconds>5</Seconds>
</Action>
<Action name="END IF">
<Type>201</Type>
<Function>1</Function>
<DTIndentLevel>0</DTIndentLevel>
<Enabled>1</Enabled>
<ErrorHandling>
<UserNotificationMode>2</UserNotificationMode>
<CustomErrorMessage/>
<OnErrorAction>0</OnErrorAction>
<JumpToLabel/>
</ErrorHandling>
</Action>
</IR_ACTIONS_LIST>
</font color=green>

Bruce
10-03-2002, 05:35 PM
As always Derek! Very gracious.

Thx