Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

How do I auto-focus first parameter of array?

George_AndersonGeorge_Anderson Member Posts: 71 ✭✭
I have an array parameter, where each has an "entities" parameter. When the user clicks "Add" to add a new array item, I want the "entities" field to be auto-selected. I'm  trying to use the UIHints for auto-focus, but it doesn't work yet.
Here's an example:
Any ideas?

Comments

  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    The "FOCUS_INNER_QUERY" only works for a selection-driven array parameter (AKA one with "Driven query" set to that query parameter). Selection-driven array parameters add items by making selections while the outer array is focused. Seems like this switch might work for your workflow, and save a button click.

    "FOCUS_INNER_QUERY" does not work on arrays that are not selection-driven, though you could submit an improvement request to suggest it!
  • George_AndersonGeorge_Anderson Member Posts: 71 ✭✭
    @kevin_o_toole_1 Thanks for the clarification about "FOCUS_INNER_QUERY". Unfortunately my real use case doesn't work with selection-driven parameters. Each "operation" accepts a variable number of entities. (So the first might take 1 body, the second 3 bodies, etc.).

    I'll submit an improvement request.
  • Alex_KempenAlex_Kempen Member Posts: 248 EDU
    It's also weird because the FOCUS_INNER_QUERY description in the documentation isn't very clear - it's currently the only place documentation where the term "QLV" is used. INITIAL_FOCUS_ON_EDIT and INITIAL_FOCUS also don't explicitly say they don't work with internal array parameters, although this is likely because their descriptions were written before array parameters were added to FeatureScript.
    CS Student at UT Dallas
    Alex.Kempen@utdallas.edu
    Check out my FeatureScripts here:



Sign In or Register to comment.