I have a Card Panel with several Cards. Each Card contains a DisplayArea with a DisplayDetail with a Button. The Button has an OnClick Behavior. I'm able to build and deploy the application.

However, when I click the Button on any one Card the OnClick Behavior is being called multiple times. In fact the number of times it gets called seems to match the number of Cards I have on the CardPanel.

asked 07 Jul, 01:18

ChrisG's gravatar image

ChrisG
1001k506570
accept rate: 57%

edited 07 Jul, 01:24


This happens due to the Button not having unique name for each Card. When build the Card (and its content) use a loop variable and update the Name property of the Button to be unique.

For example, Create an Loop Index for each Card and append the Loop Index to the Name of the Button.

NewCard.CardDisplayArea.CardDisplayDetail.CardDisplayDetailLinks.AddButton.Name =
Text.Concatenate( NewCard.CardDisplayArea.CardDisplayDetail.CardDisplayDetailLinks.AddButton.Name, "_", CardLoopIndex )
link

answered 07 Jul, 01:23

ChrisG's gravatar image

ChrisG
1001k506570
accept rate: 57%

edited 07 Jul, 01:24

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2
×1
×1
×1
×1

Asked: 07 Jul, 01:18

Seen: 62 times

Last updated: 07 Jul, 01:24

Related questions

Powered By:   Graphite