FormDataSource positionToRecord doesn't work

I am trying to load a record into a formDataSource by code using the positionToRecord function and it doesn't work.  I have a text field where the user inputs a value and on the modified method of that field, I am trying to position the record.  There is no grid on the form, just fields for input.  After the value is entered in the field, and the modified method is called, the formDataSource doesn't change. When I step through it I can see that the FigureRec record is populated.  What am I missing here to get the formDataSource record to change?

        public boolean modified()
            boolean ret;
            FigureTbl  FigureRec;
            ret        = super();
            FigureRec  = FigureTbl::Find(this.valueStr());
            if (FigureRec)
            return ret;



No Data
  • What's the point of using positionToRecord() if you have no grid? Could you explain what you're trying to achieve?

    By the way, here is a trivial example demonstrating that positionToRecord() works:

    class TestPosition
        [FormEventHandler(formStr(CustGroup), FormEventType::PostRun)]
        public static void CustGroup_OnPostRun(xFormRun _sender, FormEventArgs _e)
            _sender.dataSource().positionToRecord(CustGroup::find("A group ID"));