Display value from table in modal

I am trying to display the data from a cell in a table in the modal heading.
I already worked it out but deleted the modal and cant remember how to use $index of the row clicked to get the contents of the cells… :frowning:

You need the data detail component:

Thanks Teodor but that seems like a bit of a lengthy process just to display a single cells content.
I'm sure I used just a simple dynamic such as
image but this doesn't work either

It’s not lengthy, @jimPC. Just add one component and then add mouse click actions to the button to select the record based on the repeat and open the modal.

Hi sitestreet thanks I’ll have a closer look,
Im just wondering how I initially achieved placing the dynamic data from the cell within the table to a paragraph in the modal…I just can’t remember the syntax I know i used $index in the code somewhere…

1 Like

The tutorial @Teodor seems not be for repeats…

There is a way of creating the dynamic link with 1 line of code as I have achieved this before…Does anyone know how to do this??

Well it is actually exactly for repeats. And showing exactly a dynamic table.

Hi Teodor
ok this is an extract from the tutrorial couldn't see a repeat there

Please tell me if there is an answer to the second part of my question:

There is a way of creating the dynamic link with 1 line of code as I have achieved this before…Does anyone know how to do this??

The table body has a repeat applied ... just follow the tutorial!

I don't know how to answer this question as i don't understand what you are trying to do exactly. I provided a tutorial which explains what you are trying to achieve, and it takes no more than 2 mins to set up what's explained there!

Teodor can you just confirm then:

That there is no other way of getting data from a cell in a selected row within a dynamic table to a modal other than the method you have suggested?

As almost anything else in development, there are multiple ways of doing this.
You can use a variable to get the clicked record id and use it to filter a data source and display the details, for example.
The method I mentioned is the most efficient and thats why the data detail component exists.

And btw, the time you spent arguing with me in this topic you could have done this 30 times with 30 modals on 30 pages.

1 Like

I am not arguing with you I am just trying to get a complete answer to my question.

As a relatively new customer of yours I am bound to ask what appear to be
stupid questions so excuse me for that.

As the tutorial has some 40 odd slides which for an idiot such as myself seemed a bit daunting, I think your estimate of 30 modals on 30 pages seems a bit optimistic :rofl:…but thanks Teodor for your continued support and patience

Ok so you guys want detailed step by step guides, then on the other hand you say 40 slides are too much to follow :slight_smile: Wondering what to do with the docs :slight_smile:

1 Like

:laughing:
1 Like

I remember this tale from my childhood :slight_smile:

1 Like

Yes, a wonderful fairy tale from my childhood. But we get the tasks " Go I Know Not Whither and Fetch I Know Not What" when we are already adults. :slightly_smiling_face:

1 Like

Ok I have followed your tutorial…
But I am still unable to display data from the table.
I have replicated your tutorial exactly.

I noticed the data id is a string not a number and see from other posts this is a bug?
Question: Would this result in no data being shown?
If so should I format it to a number?

All I’m getting is the first row of data with no response when clicking other rows.

No answer??
@Teodor
Can you refer me to someone who can help me with getting your tutorial to work.
Thankyou

What is the code for the click event on your page that sends the id to the data detail?

Hi Teodor


saw a post which suggested using the id from server connector but that didn’t work either