Maximum interactions in a single component, dynamic scheduler inside a repeater


#1

How many interactions can I add in a single component?

1 in picture: My goal was to create a dynamic grid with a scheduler on it.
2 in picture: So I created a dynamic panel with 7 states of different parts of a bar.
3 in picture: Then inside a repeater, I put columns for weeks and in each week one dynamic panel with parts of the bar.
4 in picture: Then For each week I tried to create one interaction to set up in the onload event.
5 in picture: Lastly, depending on the text for each week, will paint a part of the event in the scheduler.

This works well, but I can’t create more than 49 interactions inside the repeater and I’m only in week 5 of 11 lol. Any ideas on how to insert more than 49 interactions or a work around to achieve this?

Thank you


#2

It depends on what you mean by “interactions”. Your description does not really deal with multiple interactions. Rather, it looks like you have one interaction event (Item Loaded) and many conditional cases …and I’m assuming all have the same basic action of Set Panel State.
So, am I correct in understanding that you have 49 conditional cases here?
Likewise, what is the “single component”? The dynamic panel? The repeater? Something else?

I’m not sure I understand all of what you need to achieve here, the 7 states with various “bar parts” (1 per day of week?), nor what the “49 interactions” entail (…7 weeks x 7 days?) etc. But, sure seems like you could pare this down a lot if you can represent as much as you can with numbers instead of text, and use algorithms instead of multiple Else If conditions.

Also, you should be able to greatly reduce–and even completely eliminate–your conditional cases by directly representing things in your repeater datasheet to match the names of your dynamic panel states. For example, if the “sem1” has 8 possible values (including a blank value or empty cell), just use the state name of the dynamic panel directly in your datasheet–and probably easiest at this time if you name the states to match what you currently use in the datasheet cells (e.g, maybe rename “State 1” to “ini1 cverde”) That alone could get rid of all the conditional cases you show.

I also see you have 8 cases per week with the last case of each week being “Else if true” --That is not good at all and is practically guaranteed to fail. You never ever want more than one “If true” case, because only the first one will get triggered. Not clear what actions you have for all these cases, but I might guess you are hiding the dynamic panel if the data cell is blank? If so, it would be better to have the default (top-most) state be blank–then you don’t have to deal with blank cells at all.

Here are high-level details of the approach I’m recommending (if I understand your labels):

  • Dynamic Panel (2) should have these states:
    • Blank (contains nothing; this is the default state)
    • ini1 cverde
    • ini2 cverde
    • ini3 cverde
    • ini4 cverde
    • ini5 cverde
    • ini6 cverde
    • full cverde
  • (your repeater datasheet cells must have these same exact labels)
  • The Item Loaded event just needs one action in its “If true” case to handle all possibilities:
    • Set Panel State of BarPanel to [[Item.sem1]]
      (where “BarPanel” is the name of your dp widget)
  • Then, add similar Set Panel State actions for each week, all in the same “If true” case.
  • Note that if a row is blank (or if it contains any other string that does not match a state name) the Set Panel State will ignore it–so the dp would not change states–it would just remain in the default state of “Blank” --which is what you want.

#3

Hey @mbc66, thank you for your reply.

You understood my post correctly, I wanted to say one action with 49 conditional cases, and the “single component” was the repeater itself in his item loaded event.

The 7 states with various “bar parts” are diferent blocks to build a bar with a beginning, the middle and the end, each beginning and end with 3 different posible shapes, you can see the different shapes in the picture here.

Thank you for sharing that I nedded to move the empty states at the beginning, and how to assign directly the state with the name instead of creating endless “if else” statements.

Thank you!


closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.