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
3 replies
Subscribers
7 subscribers
Views
1452 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
I have a query related to setting null values in multiple local variables in one
georgej
over 9 years ago
I have a query related to setting null values in multiple local variables in one go. Let me clarify the context ; I have around 10 fields which are displayed to user.For the purpose of discussion let's call one field as "PrimarySearch" and all other 9 fields are "SecondarySearch".He can enter appropriate values in any of the 10 fields and on submitting "SEARCH" ,it will fetch values from DB based on search criterion and display in GRID. But the issue is ,whenever he enters anything in "PrimarySearch" text box ,all other fields should be set to null and search is based only on the value entered in "PrimarySearch" text field.May be I can go with the below approach;but I need to move null values explicitly to all 9 secondaryFields.Is ther a better way of implementing this logic
a!textField(
label: "PrimarySearch",
value: local!primarySearch,
saveInto: {
local!primarySearch,
a!save(
local!secondaryFie...
OriginalPostID-154571
OriginalPostID-154571
Discussion posts and replies are publicly visible
0
georgej
over 9 years ago
...ld1,
null
),
a!save(
local!secondaryField2,
null
)
}
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Jim Schweitzer
Certified Lead Developer
over 9 years ago
Perhaps use a local "CDT" for secondary search and null the whole thing when you save primary value?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
The way you describe is really the only way, unless you use a CDT as jims suggets. Remember that, unless you've changed the refreshAfter setting on the primary field, you'll have to clear the other fields when the search button is pressed as well.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel