Expand my Community achievements bar.

SOLVED

Adding Data to a Dynamic Table from a Web Service

Avatar

Level 2

I have a dynamic table where the end user picks a name from a drop down list field, which executes my web service call that brings back the data for that name and populates the other fields in the row. It works fine when there is only one row in the table. If a second row is added then the web service call for that name updates the fields for all the names in the table and not just that row's data. How can I fix this?

Thanks ahead of time,

Brian

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

The issue is that when you create a new row the objects that are being created do not adjust their bindings to indicate that this is a 2nd occurance. So all same named objects in the table have the same binding and as such each object gets the same value. In this situation I woudl return the data to a hidden field and then do the binding myself. If you control the web service return everything in a single xml file. Then we can pasre that file and set the values into the fields. I created a sample that shows how to do this. You will not have the web service (its a LiveCycle process I created) but I think you should be able to understand what is happening.

Paul

View solution in original post

3 Replies

Avatar

Correct answer by
Former Community Member

The issue is that when you create a new row the objects that are being created do not adjust their bindings to indicate that this is a 2nd occurance. So all same named objects in the table have the same binding and as such each object gets the same value. In this situation I woudl return the data to a hidden field and then do the binding myself. If you control the web service return everything in a single xml file. Then we can pasre that file and set the values into the fields. I created a sample that shows how to do this. You will not have the web service (its a LiveCycle process I created) but I think you should be able to understand what is happening.

Paul

Avatar

Level 2

Paul,

I received your reply, added below, via email but for some reason I am not seeing it in the forum discussion.

The issue is that when you create a new row the objects that are being created do not adjust their bindings to indicate that this is a 2nd occurance. So all same named objects in the table have the same binding and as such each object gets the same value. In this situation I woudl return the data to a hidden field and then do the binding myself. If you control the web service return everything in a single xml file. Then we can pasre that file and set the values into the fields. I created a sample that shows how to do this. You will not have the web service (its a LiveCycle process I created) but I think you should be able to understand what is happening.

Paul

Can you post the sample again please?

Thanks,

Brian

Avatar

Level 2

Interestingly when I made my second post asking you to post the sample again it made your first post visible to me so nevermind the second request.

Thanks,

Brian

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----