GithubHelp home page GithubHelp logo

Comments (6)

lindski avatar lindski commented on August 29, 2024

It is possible to set constrained by using [%CurrentObject] however there is a limitation in that the association needs to be set and committed on the context object.

I've added a test called 'Constrained By' in the test project that shows using [%CurrentObject] but I will need to have a think to see how we can achieve the same behaviour with associations set in memory (which is what is really needed)

from autocompleteformendix.

lindski avatar lindski commented on August 29, 2024

Ok, I think I have managed to do this by adding two additional parameters in the Search tab:

  1. Constrained by [Context] - Select an association from the data view context if you want the results to be constrained by a particular object. Must be used alongside 'Constrained by [Source]'
  2. Constrained by [Source] - Select an association from the AutoComplete's source entity if you want the results to be constrained by a particular object. Must be used alongside 'Constrained by [Context]'

I need the first one in order to retrieve the ID of the object to filter the results by. I need the second one so I can apply the correct xpath with the retrieved ID.

An updated widget is available in the dist folder. Let me know if this solves it for you

from autocompleteformendix.

lindski avatar lindski commented on August 29, 2024

sorry, dist folder is only on my local machine! You'll need to take the widget from the widgets folder in the test project

from autocompleteformendix.

dkho87 avatar dkho87 commented on August 29, 2024

I'm testing it right now, but at first sight it seems to do exactly that what I was looking for, so KUDOS and much appreciation for working on this! I'll do some test (On change, etc.) and come back to you to finalize this.

from autocompleteformendix.

lindski avatar lindski commented on August 29, 2024

Great, let me know how your testing goes... if all goes well I'll publish a new release on to the app store

from autocompleteformendix.

dkho87 avatar dkho87 commented on August 29, 2024

Does exactly what I need! Only thing I'll take care of with an On Change microflow is emptying certain associations as soon as something up the tree requires it (for example: Category was Food with subcategory Drinks and category is changed to Cars. Subcategory remains selected at Drinks, while the possible options is now different. But like I said, nothing that can't be handled through On Change microflow logic)

from autocompleteformendix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.