Set default value to a Prompt and Response step from a Currency (Money) field

You may know that Dialog Process is deprecated, but I’ve kept bumping into it recently with past projects. Today I have a request to set default value to a Prompt and Response step with value from a Currency field. It should be easy as I first thought but it isn’t.

In the Prompt and Response step, there is a Default Value property so you can set value to it. The value can be pulled from fields of the current record or from dialog variables and arguments. I wanted to populate the current amount in the record, so I went and selected the field, then activated the dialog. But when I ran the dialog, the field is blank. I was sure there is a value from the record. Then I tried to populate the value in the label, and ran the dialog again. This time the field was still blank, but the label is populated with the value in money format.

step1

dialog1

Well, the problem is the Prompt and Response step is a Float number field while our field is a Currency field. So the dialog step doens’t understand the Money type. Luckily, there is a workaround, we can use dialog variable of type Float number, and somehow the dialog variable understand the Money type. So what we have to do is create a variable, assign money value to it, then use the variable to set default value to the dialog step.

step2setvariablestep3

That should does the job, although I’m not sure why 🙂 Cheers!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s