I need a custom record field, of which the value is the result of query, can we do any query in custom record field
Discussion posts and replies are publicly visible
The documentation has all the info and examples: https://docs.appian.com/suite/help/24.3/custom-record-fields.html
No you cannot use query in a custom record field.
You have limited functions to use in sync time and real time evaluation, queryEntity is not among that.
Sorry, no. That would get you in a huge performance risk situation. To avoid such danger, Appian does not support this.