Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Suggested Answer
Replies
4 replies
Answers
1 answer
Subscribers
11 subscribers
Views
3080 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Anyone can Explain why we are using comma(,) at end of the code?
tirumalar0001
over 6 years ago
Where we can use comma where we canot use comma?
Discussion posts and replies are publicly visible
0
Shanmukha
A Score Level 1
over 6 years ago
It is just to use the separator for vairables and functions in the code. Like we have semicolons and other charecters in the different programing languages. This is how the program reads each step of the code and will execute it in the same way.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
davel001150
Certified Lead Developer
over 6 years ago
Commas in Appian almost always are used for separating items in a list, so Appian will know you've moved on to the second item; or more crucially, commas are used to separate inputs to a function, so Appian will know you've moved on and you're referring to the next input.
Let's have hypothetical function A. Your code could look like this:
function A(
input1: "this is my first input"
input2: "this is my second input"
and Appian is left to assume {"this is my first input" input2: "this is my second input" } is what you intended to put in the first input of function A. It doesn't understand what to do with this. You put a comma, and it starts looking for the definition of the second input, and it understands. When you don't use keywords for passing inputs, there's no other way for it to know than assume first comma is the end of first input, second comma is the end of the second, and third comma is the end of the third. Comma is the signal for Appian to start looking for the next input, so you don't put a comma after the last one.
I hope I have explained this well.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Reject Answer
Cancel
0
ravir0001
Certified Lead Developer
over 6 years ago
Hi Tiru,
We use Comma in Appian to separate the statements. So that Appian can differentiate and convert the code .We dont use comma after the last line of the statement, so that Appian understand that we reached to the end of that block.
a!textField(
label:"FirstName",
placeholder:"Your First Name",
saveInto:{},
validations:{}
),
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Sai Harsha
over 6 years ago
It is just to use the separator for vairables and functions in the code. Like we have semicolons and other charecters in the different programing languages.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel