Upvote 1

read multiple lines from a datalist

Answered oscar ward 7 years ago

I have a datamaster that has records that reference an id. but depending on the id, they can be multi lined

so there can be 2 or more records associated with a3 for instance.


I can read a single row to a variable, but what id like to do is have every row associated with a particular id to a form for editing.


is this possible? so if I click on the id from a data list I can have all of the records that match that id displayed for edit.


Thanks

Replies (8)
photo
1

Dear Oscar,


You will need to create a filter with all the instances from the data master where the field id should be equal to what you need. Then you will need to include that into a variable so that variable contains all the instances.


Best,


Sonia Durán

photo
1

But how would you reference the other fileds on the form.


As I said I want to display this data on a form for editing. I can ref the initial fields that correspond to the first row and display them, but cant work out how to ref the next set.

photo
1

Hi Oscar,

In order to provide you the best solution , can you send an example vp.file) applied to the context of the prototype you are working in. You can attach files here with a .rar extension.

Best,

Sonia Durán

photo
1

ok, so again what I am trying to do is read records from a datamaster and that's easy with a single line.

But what I have is a requirement the calls for records that have the same id and each line contains different data bits. (combining the rows is not an option)

But when I read click a record, ID if it has multiple lines associated with it, Id like to have each line put on a separate line of a edit form

photo
1

Dear Oscar,

Here you are an example we've created for you based on what you need. Hope it helps.

Best,

Sonia Durán

photo
1

Sonia, that worked like a charm. I can display every line associated with and ID(ssp)


But now I save any changes.


If I add a button and attach a datamaster mod event how would I indicate I want to save the changes it only line 4 was edited.


Ive tried reading the value of input1 from the datalist and then use that to filter the form. and that works fine.

But now when I try and write the value from the form back out it erases all the lines except what was displayed in the form. How do I get it to not destroy the other records

Thanks for your help!

247e5d81a17ae2b1a2020b4c1b79bcb3

photo
1

Dear Oscar,


The follow tutorial should help you to get some ideas. Then you should create a set value event to refresh the values of the other data list.


https://www.justinmind.com/support/how-to-edit-in-place-the-rows-of-a-data-list-in-your-web-prototypes/


Best,


Sonia Durán

photo
1

No, I have done that, but I was specifically asking about using a button. if Im using the button to do the update. It only writes back the edited set and erases all the other rows.


But thanks for your help

Leave a Comment
 
Attach a file
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!
You can't vote. Please authorize!