refreshing input box inside table record

refreshing input box inside table record

i am trying to refresh a texbox inside a table record but the value assigned to it at runtime is not getting refreshed.
can anyone tell me how to achieve this ?

Here is the screenshot,  where upon clicking on "Get fleet codes from Contract" button, i am trying to assign values to the input boxes and refreshing it. but it doesnt work.
Hi Leo,

I created a quick example of how to go about something like this. It's difficult however to understand your exact use case, so I might have misinterpreted what you want.
Leo -

You need to post the OML here if you would like help, there is not enough information to go on in this post.

Hi Killian,
Thanks for the reply... let me brief my question.. in the sample example you gave you are making the fleet code as blank in preparation.. but in my case the fleet code is blank in the table at preparation. I need to fetch the fleet codes from another table and will assign those to the text boxes after clicking on the button.

Atatched is the sample module which shows what i am trying to achive. Please help.


That was obvious to me, I just made a quick example to show the general behaviour. A table records is always based on a record list with a fixed structure. You need to update the source record list, then Ajax refresh the table to show the updated data. In my example I did it with a quick hack on a single example table. You can do it any way you like, as long as the you update the source record list and refresh the table records widget.
I looked at your example: if instead of assigning RepairDataTable.List.Current.REPAIR_DATA.FLEET_NO you assign the local variable (which is the table's source) RL_Repair_Data, and remove the RunJavaScript, it should work.
I already did that .. but unfortunately it didnt worked.
Well, that really should work. Perhaps you can create an example OML that does that, but doesn't work, and post that for us to take a look at.
I have taken a look into your TestModule.oml and I agree with Kilian - it should work, assigning to that local variable which is the source of your table.

Run debugger and check where is this broken... we don't have the entities referenced, so we can't debug.
Atatched is the updated oml where after clicking on the button, i am able to get the value only on last input box. rest all are blank. we do have values in the query.

You just see your last input because the rest are getting lost... You need to append those records to the list for each iteration.

Your ForEach goes over the record list of the table records, but your assign assigns the Current of the RL_Repair_Data. But that current is not the same as the current of the RepairDataTable.List. You need to loop over the RL_Repair_Data list, so that the Current is updated.

@Tiago: If he does that, he'll end up with a double list!
Hehe... :D
Because Leo was iterating on a different list than the one he was assigning I got mixed up on that.
But he could divide the list in 2 and keep the second half with just the inputs. ahah :D

Sorry, couldn't help laughing. It's good when we are able to do it of ourselves
This could also be done differently.
No need for that local variable. You could use a simple query (I believe you are using instead of that advanced query and use the query list output as source of the table.

Leo, did you manage to achieve what you wanted? 

BINGO .... that worked. I was mistaken with the looping source. i made the loop at RL_Repair_Data and it worked. Thank you Guys ..You are the CHAMPS !
Cheers !!

But still i have one question, is there a way by which i can get the runtime ID of the textbox inside table records.
I tried to get that by "javascript:getset('"+Input_FleetNo.Id"');" but it resulted blank.
I'm not sure whether there is, but you really shouldn't feel the need to do so, except in very special cases.