Delete rows not update dynamic panel


#1

hi, i’m trouble this issue.

when i delete row in repeater, dynamic panel inside repeater is update to first panel automatically

my logic is

shown repeater > panel - set panel state 2

and then delete rows > panel - set panel state 1

i want to set panel state 2 when i delete row

is it possibe?

thanks

https://4kn995.axshare.comtest.rp (132.3 KB)


#2

test.rp (133.4 KB)


#3

thanks!!!

It helped a lot.


#4

Jorkin is always very helpful! Thanks. Now I wanted to extend this interaction to include a Favorite heart icon on the right of each name. When the X is clicked, the repeater resets the Fav hearts. All of the Fav’ed names will default back to “Unfav’ed/outline white heart”, instead of keeping the previously Fav’ed status. So the idea is that it doesn’t matter which name you remove, the repeater should leave other name fav status unaffected. Is it possible? Thanks.

test_jorkin_heart.rp (166.2 KB)


#5

just save your “Favorite heart state” into repeater.
and set it to the correct state when loaded.


#6

I tried. It didn’t work. The repeater needs to remember what state the Fav heart was in previously, and set to that same state when it’s reloaded. So this Fav state is a variable. That’s where I’m having some difficulty.


#7

test_jorkin_heart.rp (72.9 KB)


#8

Thanks Jorkin! My confusion is: [[!Item.Heart]]. Not sure what’s going on here and the function of !

I think onClick, it needs to set the heart to True.

Click Or Tap
Edit Row Data
Table Repeater set Heart to “[[!Item.Heart]]” for This

This part should do just that: set the respective heart to True. But I just don’t quite understand [[!Item.Heart]]. Please explain it to me. Thanks.


#9

The logical NOT ( ‘!’ ) operator (logical complement, negation) takes truth to falsity and vice versa. It is typically used with boolean (logical) values. When used with non-Boolean values, it returns ‘false’ if its single operand can be converted to ‘true’ ; otherwise, returns ‘true’ .


#10

Yes! That was my guess too. Axure’s documentation only mentioned the ! usage in Math, Function section of reference. There’s only one example I found below. But Axure didn’t explain the ! part.

Does not equal: !=

[[ 5 + 2 != 8 ]] -> true

I just wasn’t sure the proper way of using ! in the Axure syntax. I wish Axure’s references library has more examples on that. I’m not a coder :persevere: