This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[SOLVED] Showing Conditions dialog in custom client application

Dear community,

Does anybody know if there is a way to  to show search conditions dialog in Windows Forms application and get search conditions from it (Using C#)?
I need user to specify conditions and then do some MFiles API actions on searched objects.

Parents
  • Hi Mikka. Thank you for reply.

    I ended up using approach described below (I think it is even better than showing filter dialog would have been).

    I created folder selecting dialog (www.ookii.org/.../)
    and assigned starting path to M-Files vault that user is working with.
    All code below is C#.

    string vaultPath = string.Format(@"{0}:\{1}\", MFilesInstance.MFClientAPP.GetDriveLetter(), vault.Name);
    DialogResult res = dlg.ShowDialog();
    if (res == DialogResult.OK)
    {
    list.ViewPath = dlg.SelectedPath.Replace(vaultPath, "") + @"\";
    lbl_selectedView.Text = list.ViewPath;
    }


    dlg.ShowDialog() will show vault's root view (Like on image below). There, user can specify filters, search or select view with desired objects


    After user has selected view. I can do my API stuff on view (Or temp view with search results) that user selected like this:

    oResults = Vault.ObjectSearchOperations.GetObjectsInPath( lbl_selectedView.Text, false, true);
    //..do my stuff with SearchResults

Reply
  • Hi Mikka. Thank you for reply.

    I ended up using approach described below (I think it is even better than showing filter dialog would have been).

    I created folder selecting dialog (www.ookii.org/.../)
    and assigned starting path to M-Files vault that user is working with.
    All code below is C#.

    string vaultPath = string.Format(@"{0}:\{1}\", MFilesInstance.MFClientAPP.GetDriveLetter(), vault.Name);
    DialogResult res = dlg.ShowDialog();
    if (res == DialogResult.OK)
    {
    list.ViewPath = dlg.SelectedPath.Replace(vaultPath, "") + @"\";
    lbl_selectedView.Text = list.ViewPath;
    }


    dlg.ShowDialog() will show vault's root view (Like on image below). There, user can specify filters, search or select view with desired objects


    After user has selected view. I can do my API stuff on view (Or temp view with search results) that user selected like this:

    oResults = Vault.ObjectSearchOperations.GetObjectsInPath( lbl_selectedView.Text, false, true);
    //..do my stuff with SearchResults

Children
No Data