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
+1
person also asked this
people also asked this
Replies
12 replies
Answers
2 answers
Subscribers
12 subscribers
Views
7648 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Data and Records
Default Filter
mayureshs
over 7 years ago
Hi all,
I have an employee entity which contains employee details except status of employee(Active or Inactive).I have different entity called employee status which contains status of employee with employee IDs. The issue is how to configure default filter for active employees, Can anybody suggest me best way for it?
Actually i have tried one scenario like: I have written QueryEntity which will gives all active employeeIDs from employee status entity, and i have used employee ID as field in default filter and used operator "IN" and In value section i called above queryEntity expression rule,but i am getting following error:
The Requested Record Type Is Not Available
Cannot apply operator [IN] to field [org_emp_id] when comparing to value [TypedValue[it=197,v={TypedValue[it=3,v=INC-16004],TypedValue[it=3,v=INC-16005],TypedValue[it=3,v=INC-16006],TypedValue[it=3,v=INC-16007]}]]. (APNX-1-4203-015)
...
OriginalPostID-244537
Discussion posts and replies are publicly visible
0
mayureshs
over 7 years ago
...Can anybody help me out with this.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rodgraham
Certified Lead Developer
over 7 years ago
I'd create an entity that contains employee details and their status. You could do this either by creating a view in the database joining the two tables or potentially using jpa annotations in an xsd. Does an employee have a single status?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sridevik7401
Certified Lead Developer
over 7 years ago
@mayureshs ...Instead of fetching data from multiple entities, write a view which gets required data from multiple entities.And this view can be used for fetching employee's status using employee Id
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
+1
Rama
over 7 years ago
@mayureshs: IN operator won't work for List of Variant in your case.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Reject Answer
Cancel
0
aloks0189
Certified Lead Developer
over 7 years ago
@mayuresh I suggest you to write a view in db and create a CDT which should map that created view. And refer that CDT using constant and then use a!queryEntity() along with filter. I hope this Will resolve your problem statement
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mayureshs
over 7 years ago
thanks to all of your suggestion!!!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mayureshs
over 7 years ago
@ramchandrar yes i did the same thing and it is working fine.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
harishkumart
Certified Lead Developer
over 7 years ago
@ Mayureshs can you get me through your table structure bit clearly. As far I understand you are storing a nested CDT of type employee status in the employee CDT. If so you can directly use the field name using dot operator and can compare with the relavent value. If both the CDT s are independent then I would recommend you to construct a view to retrieve your desired values and can compare accordingly.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
harishkumart
Certified Lead Developer
over 7 years ago
@Mayureshs I hope it helps you. And please do conform that your employee holds single status at any time. Giving us clear structure of your CDT structure may help us suggest better possibilities.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
+1
mayureshs
over 7 years ago
@harishkumart i think there is no need of writing view, As ramchandra said IN operator will not work for List of variant so tried with array of String and it is working fine.thanks for your suggestion
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Reject Answer
Cancel
>