Sourcetableview - subform

snehasneha Member Posts: 191
I have added a new filed (customfield - integer) to production bom line and is editable on the form. User enters value into this field, now I want to sort production bom lines subform based on this new field.

I have added a new key (customfiled) to production bom line table. Adding this key to sourcetableview property, is the right way to do?

Comments

  • garakgarak Member Posts: 3,263
    If you will set it dynamically , u must use the setcurrentkey() command on the subform.
    But don't forgett, that the PK is "Production BOM No.,Version Code,Line No." and the property AutoSplitKey is YES on the subform.
    So, if you change the key, the datas in the subform has a other order. If you then insert a line between two other lines, you can become the errormessage like:
    "The Production BOM Line already exists. Identification fields and values: xxxxxxx"

    Regards
    Do you make it right, it works too!
  • snehasneha Member Posts: 191
    Thank you Garak, I placed the setcurrentkey(customfield) on Onopen subform. I entered the lines 1..5. Now when I change the value on custofield, lines are jumbling, and some times I am getting error message – Production BOM Line already exist- for new line insertion. I understood the reason of error message, because lines are sorted by customfield (not Line No.), and Autosplitkey is causing the problem. But how best can I do this without changing any property of the form
Sign In or Register to comment.