playMaker

Author Topic: Problem with Data Maker and Dropdown UI Component  (Read 104 times)

C.J.Geringer

  • Playmaker Newbie
  • *
  • Posts: 43
    • View Profile
Problem with Data Maker and Dropdown UI Component
« on: September 25, 2017, 09:50:37 AM »
Hello, I am trying to create a system for a user to choose a category , and then an option in that category.

There is a FSM that looks into a .xml file for the categories and adds them as option to a dropdown UI component. Once the Category is selected, an FSM looks into the children nodes to fill the options of a second drop down.

If the category is changed, the FSM clear the second dropdown, but fills it again with the same options as the first category. If I donĀ“t clear teh secodn dropdown component, it adds the correct option to the new category, so I know the xpath query is working right.

Does anyone know what the problem is?

Thank you for your time


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Problem with Data Maker and Dropdown UI Component
« Reply #1 on: September 26, 2017, 01:29:28 AM »
Hi,

 you need to reset the getnext action, which action are you using to get the options from xml?

 Bye,

 Jean

C.J.Geringer

  • Playmaker Newbie
  • *
  • Posts: 43
    • View Profile
Re: Problem with Data Maker and Dropdown UI Component
« Reply #2 on: September 26, 2017, 02:58:02 PM »
I am using "xml get node list properties". I set the "Reset" variable to true, but it does not work.



Is there a way to manually reset the node list?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Problem with Data Maker and Dropdown UI Component
« Reply #3 on: September 27, 2017, 01:48:38 AM »
Hi,

1: create a fsm bool valled "loopResetFlag"
2: before you enter this state and start looping have a state where you set this bool to true
3: in the action use that variable for the reset property

so now when you enter the state from where youa re going to loop, if the flag is true then it will reset the counter and start from 0 again.

Bye,

 Jean