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
3081 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
Parents
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
Reply
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
Children
No Data