Ask Your Question

# Revision history [back]

I think I found a workaround which is probably not ideal but seems to do the job. I changed the column "Inflection" to a read-only listbox by selecting Enabled:No and Read-only:Yes in the listbox properties. I also modified my query clause by adding a column for "VerbInflection"."ID", which I then used as the bound field of the listbox and marked WordForm's "ID" as the data field. It feels counter-intuitive as I'm not really even attempting to change the ID at any stage but it seems to produce the results I want.

For existing records, the grid now shows what I expect. Whenever I create a new record or change the values of an existing one, I need to force Base to notice the change by clicking on the WordForm grid and then clicking on Refresh in the toolbar at the bottom of the page. I guess this could even be automated with some sort of macro.

If anyone has any better ideas or sees a potential problem with this solution, please let me know. Otherwise, I will soon mark the question as solved.

I think I found a workaround which is probably not ideal but seems to do the job. I changed the column "Inflection" to a read-only listbox by selecting Enabled:No and Read-only:Yes in the listbox properties. I also modified my query clause by adding a column for "VerbInflection"."ID", which I then used as the bound field of the listbox and marked WordForm's "ID" as the data field. It feels counter-intuitive as I'm not really even attempting to change the ID at any stage but it seems to produce the results I want.

For existing records, the grid now shows what I expect. Whenever I create a new record or change the values of an existing one, I need to force Base to notice the change by clicking on the WordForm grid and then clicking on Refresh in the toolbar at the bottom of the page. I guess this could even be automated with some sort of macro.

If anyone has any better ideas or sees a potential problem with this solution, please let me know. Otherwise, I will soon mark the question as solved.

Edit:

After a lot of trying, I finally found the appropriate way to refresh the WordForm table with a macro:

   oMainForm = thisComponent.Drawpage.Forms.GetByName("MainForm").GetByName("WordForm")
oMainForm.unload
oMainForm.load


The logical alternative of just writing oMainForm.reload, which was suggested in some other posts and other forums, had no effect on the main table.

I think I found a workaround which is probably not ideal but seems to do the job. I changed the column "Inflection" to a read-only listbox by selecting Enabled:No and Read-only:Yes in the listbox properties. I also modified my query clause by adding a column for "VerbInflection"."ID", which I then used as the bound field of the listbox and marked WordForm's "ID" as the data field. It feels counter-intuitive as I'm not really even attempting to change the ID at any stage but it seems to produce the results I want.

For existing records, the grid now shows what I expect. Whenever I create a new record or change the values of an existing one, I need to force Base to notice the change by clicking on the WordForm grid and then clicking on Refresh in the toolbar at the bottom of the page. I guess this could even be automated with some sort of macro.

If anyone has any better ideas or sees a potential problem with this solution, please let me know. Otherwise, I will soon mark the question as solved.

Edit:

After a lot of trying, I finally found the appropriate way to refresh the WordForm table with a macro:

   oMainForm = thisComponent.Drawpage.Forms.GetByName("MainForm").GetByName("WordForm")
iRow = oMainForm.getrow
oMainForm.unload
oMainForm.load
oMainForm.load 'jumps to the first record
oMainForm.absolute(iRow) 'moves back to the record which was previously selected


The logical alternative of just writing oMainForm.reload, which was suggested in some other posts and other forums, had no effect on the main table.