this is the query how can i write a expression rule for this and the result will be like below
Discussion posts and replies are publicly visible
As Mike Schmitt suggested use queryentity or queryrecordtype. Please go through https://docs.appian.com/suite/help/24.3/Query_Recipes.html if you are new to Appian to understand how this can be achieved.