Otis wrote:
You should call GetFieldsInfo()
(Adapter. SelfServicing doesn't have this method, you should then use: IEntityFields fieldsInResultset = EntityFieldsFactory.CreateTypedViewEntityFieldsObject(TypedViewType.MyTypedView); )
I'm using SelfServicing (any reason to switch to adapter?) and I got your second example to work in as far as being able to use a string to look up a field, but I think I'm on the wrong track. I guess I should back up to what I'm actually trying to accomplish.
I basically am trying to setup sort's and predicates so I can pass in a string column name and a value (or sort operator). So instead of
SortClauseFactory.Create( MyTableFieldIndex.Id, SortOperator.Ascending )
I'd have something similar to
SortClauseFactory.Create( FindTable( "Id" ), SortOperator.Ascending )
or
SortClauseFactory.Create( MyTableEntity.Fields[ "Id" ], SortOperator.Ascending )
but I can't get it to compile since the only overloads to the predicate and sort methods use the actual fieldIndexes. Are there any alternatives?