Which of the following variable names respects the UiPath best practices?

Question about variables and Best Practices.

@nevesisabela963

Extractedphonenumber…basically including test ,variable or in/out in a variable is not a good practice

A varible should be defining the purpose

Cheers

1 Like

@nevesisabela963,

ExtractedPhoneNumber is the good practice as it self explanatory.

1 Like

ExtractedPhoneNumber

Because it is defining the variable purpose and following the casing

The one you selected is for arguments
When we pass argument in the code we give its direction also @nevesisabela963

1 Like

ExtractedPhoneNumber is the best practice as it is much more descriptive and the in_FirstName is good only for Argument not Variable because it shows the direction in from a workflow to another

1 Like

Hello @nevesisabela963 .

Option C Follows best practices well. It is descriptive, indicates what data it holds, and uses Pascal case.

in_FirstName will be bestpractice in case of Arguments.
MyTestVariableBool although it describes the type, it’s overly generic and not clear about its specific purpose.
MyVariable ,this is too vague and does not provide any context about its use.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.