The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.
I have an infotable session variable called testsessvar, it is defined with a datashape (containing 2 text fields: Doc_Name, Doc_URL)
on the server side I have a service defined as follows
{
input newinfotable_entry (using same dateshape as the one the session variable uses)
tmp = Resources["CurrentSessionInfo"].GetGlobalSessionValues().getRow(0).testsessvar;
tmp.AddRow(newinfotable_entry);
result = tmp;
}
the output of this service is connected with the session variable in the mashup (so the update of the session variable is being done on the client side, I have also tried to update it in the script with same result)
The idea is to be able to continually add rows to the infotable session variable
unfortunately the only thing being added is empty objects (the below image shows what gets returned from
the above service)
This second image shows the input value of newinfotable_entry
Solved! Go to Solution.
Hi @KK_9150368,
I have attached some example entities that shows adding rows to a session variable. I am not exactly sure why your example is not working but in mine I passed in the info table session variable to my service to add rows.
If you are updating session variables via the session tab in a mashup ( client side ) it is best to pass this variable into your target service instead of using: "Resources["CurrentSessionInfo"].GetGlobalSessionValues().getRow(0).testsessvar". The resources gets session variables server side.
Thanks,
Travis
BTW, the 2 versions of TWX if have tried this on are: 9.2.0-b30 and 9.1.0-b10877
I am not a professional, but when adding values, I assign the row-values individually.
Like this:
tmp.AddRow({
Doc_Name: newinfotable_entry.Doc_Name,
Doc_URL: newinfotable_entry.Doc_URL
)};
I hope this helps
Best regards
I actually tried that also to no avail
Hi @KK_9150368,
I have attached some example entities that shows adding rows to a session variable. I am not exactly sure why your example is not working but in mine I passed in the info table session variable to my service to add rows.
If you are updating session variables via the session tab in a mashup ( client side ) it is best to pass this variable into your target service instead of using: "Resources["CurrentSessionInfo"].GetGlobalSessionValues().getRow(0).testsessvar". The resources gets session variables server side.
Thanks,
Travis
Travis,
Thanks for the info. I decided to use a data table instead. I will keep this for future reference
Hi @KK_9150368.
It sounds like your question was answered to your satisfaction. If so, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.
Regards.
--Sharon