Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Expression logic of ToString

LiJing
6 - Meteoroid

I am in the middle of the learning course regarding how to create a Macro workflow, 

One step is to add "$" to the fields of amount, and also change the format from XXXXXX.XXXX to XXX,XXX.XX,

I tried the expression as "$"+ToString([_CurrentField_], 2,1) in Fomula tool, but no change to the original form.

My question is:

1. anything wrong with this expression?

2. is there anyway to know the meaning of each Expression, better with an example?

5 REPLIES 5
LiJing
6 - Meteoroid

the workflow can be found here

ShankerV
17 - Castor

Hi @LiJing 

 

One way of doing this.

 

ShankerV_0-1685520107106.png

 

"$"+tostring(Round([Field1],.01))

 

ShankerV_0-1685520231742.png

 

Many thanks

Shanker V

 

FrederikE
13 - Pulsar

Hey @LiJing

 

I think question 1. is answered by @ShankerV

For question 2. I'd recommend the Alteryx help site - every function is explained there very well - also with multiple examples each: 

General function overview: https://help.alteryx.com/20231/designer/functions

Conversion functions: https://help.alteryx.com/20231/designer/conversion-functions

 

LiJing
6 - Meteoroid

Thanks for your solution, Shanker V.

Sorry for the late response, still in the middle of monthly closing and budget planning.

now I got to know how to use Tostring, but still I have 2 more questions, 

 

1. what does each field mean under "variables", where can I find the definition?

LiJing_0-1685889771102.png

 

2. I tried to save the created Macro, but when I try to open it in a workflow, there is not input/ output button, would you have any idea about this?

 

 

jdminton
12 - Quasar

@LiJing you're using a multifield formula tool. The variables will allow something to apply to multiple fields. To use a macro, you will need to insert it into a workflow. If you have the macro open, you can do this by right clicking on the canvas and selecting Insert and then Macro (at the bottom of the list). Once you insert the macro into your workflow, you should see input and output anchors.

Labels