Video Screencast Help

Adding the correct condition to display Message Box

Created: 23 Oct 2012 • Updated: 24 Oct 2012 | 4 comments
This issue has been solved. See solution.


I'm hoping this will be a simple solution, I may just be overlooking this somewhat...
All I'm trying to do is bring up a message box if some edit fields on my dialog have not been filled in.

I created a custom action (Call VBScript From Embedded Code) - Name: VB_SCRIPT
msgbox "Please fill in all details.",4096,"Further information required"

Once I created this, I left the No Sequence tick box ticked so it's not in the execute immediate/deferred list under the Location tab. Is that correct?

I then went go into the events on the NEXT button, and added a DoAction with the Argument set to the name of VB_SCRIPT.

What I'm struggling with is the condition field. I need to add some kind of condition right? but I don't quite know what as I can't seem to put public properties into the condition builder?

The public properties of the 2 fields shown above are as follows:
SQL Server Instance            - WEB_SVC_SQL
Drug Information Database  - WEB_SVC_DB

If someone could help me a little, I'd be grateful.


Discussion Filed Under:

Comments 4 CommentsJump to latest comment

EdT's picture

Do these public properties exist at this point?

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Paul1977's picture

They do exist yes.

Actually I've been playing around with it this morning and managed to kind of get it working.

I made the mistake of putting this into my condition which kept on throwing an internal error of 2804.
[WEB_SVC_SQL] = ""

So I have changed it to this:

By changing it, it now gives me what I need. So the message box appears if this edit field has no data in it.

When the message box appears, I click on the OK button and rather it going back to the same screen so I can populate my field, it jumps to the next one in sequence.

Paul1977's picture

I suppose if I had an actual dialog I could add something like a 'WisePrevDlg' event to the OK button.

Not sure on how to do it this way....

Paul1977's picture

I seem to be answering my own questions here..... :)

If I run into this problem again then with a bit of luck I will find this post to remind me! hence why I shall put down what I did here....

I used the SpawnDialog event on the NEXT button as shown below:

Event: SpawnDialog
Argument: Info (this is the name of my new dialog)
Condition: WEB_SVC_SQL = "" OR WEB_SVC_DB = ""

I then set 2 events on the OK button for my dialog called 'Info'

Event: EndDialog
Argument: Return
Condition: 1

Event: DoAction
Argument: WisePrevDlg
Condition: 1

Then I made sure the tick box was unticked against this dialog in Dialogs view. If it isn't then it will display even if both edit fields have been populated with some data.

Hope that helps someone.