Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
7 subscribers
Views
2232 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hi, I would like to create textFields dynamically based on the value
aswinb
over 11 years ago
Hi,
I would like to create textFields dynamically based on the value of a count variable.
I wrote the following apply function for doing that, but so far it is not working. I think it is a minor problem with my apply function. Can anybody help:
apply(
a!textField(label:" Technical Officer "& _ & "Hours to complete PSA:", value:ri!hours, saveInto: ri!hours), makeRange(local!technicalOfficersCount))
Basically i want to create however many textfields as are there in the local variable technicalOfficerCount. Any ideas would be deeply appreciated....
OriginalPostID-104744
OriginalPostID-104744
Discussion posts and replies are publicly visible
0
ben.anderson
Appian Employee
over 11 years ago
Create a rule that uses the SAIL textField component and has the label, value and saveInto fields as rule inputs. Then you can do something like:
apply(
rule!yourPrefix_textField(
merge(
repeat(length(local!technicalOfficersCount),"Your Label Text"),
repeat(length(local!technicalOfficersCount),ri!hours),
repeat(length(local!technicalOfficersCount),ri!hours)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aswinb
over 11 years ago
Hi Ben,
I have the following code but its not working:
=load(
local!techCount:4,
apply(DCMIFS_CustomTextField(label:_, value:_, saveInto:_),
merge(
repeat(length(local!techCount), "Hi"),
repeat(length(local!techCount), ri!hours),
repeat(length(local!techCount), ri!hours))
)
)
Can you pinpoint out the problem pls?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
aswinb
over 11 years ago
Also the label of each textfield should be based on the number of technical officers.....so it should be like "Technical Officer 1", Technical Officer 2",....that's where I have the problem. Cannot put that i, 2, 3 into the Technical Officers text in the label.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ben.anderson
Appian Employee
over 11 years ago
Since local!techCount is set to an integer you won't need to use the length() function. length(4) will return 1
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ben.anderson
Appian Employee
over 11 years ago
You may want to use the enumerate() function in your label expression.
forum.appian.com/.../Mathematical_Functions
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel