Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!
The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.
Expression Rule:
cast('type!{urn:com:appian:types:HSM}HSM_Elements?list', a!queryEntity( entity: cons!HSM_Entity, query: a!query( pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 5000, sort: a!sortInfo( field:"S_No", ascending: true, ) ) ) ).data )
I want to retrieve every data without Status field from database.
Is it possible to retrieve using rules?
Discussion posts and replies are publicly visible
You can use the 'selection' parameter in the a!query() to pass all the other field names except status.
I have added 'selection' paramater in the a!query. And also passed all fields excep status.
But it shows an error like in above template.
My Updated Code:
cast('type!{urn:com:appian:types:HSM}HSM_Elements?list', a!queryEntity( entity: cons!HSM_Entity, query: a!query( selection:a!querySelection( Columns: a!queryColumn( field:{"S_No","Employee_Name","Employee_Id","Employee_Email_Id","Query","Comments","Date"}, ) ), pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 5000, sort: a!sortInfo( field:"S_No", ascending: true, ) ) ) ).data )
A queryColumn can only have one column name. And hence you will have to add multiple query columns. Check the code below..
cast('type!{urn:com:appian:types:HSM}HSM_Elements?list', a!queryEntity( entity: cons!HSM_Entity, query: a!query( selection:a!querySelection( columns: { a!queryColumn( field:"S_No", ), a!queryColumn( field:"Employee_Name", ), a!queryColumn( field:"Employee_Id", ) } ), pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 5000, sort: a!sortInfo( field:"S_No", ascending: true, ) ) ) ).data )
Thank You for your support Harshit.
It works.
Great. If it has worked for you, please consider accepting the answer. It helps other people look for the solution quickly and also saves time for other contributors as they'll know the author has already found a solution to the problem.