How to set data in table by scripting
-
anuragkumar5 years ago #16517
Hi Team,
Is there any way, we can set the values in table by scripting.I have a table in Scroll Container with around 40 columns. Its getting very difficult to map What I want to do is store the data returned from the Connector or Business object call into a global variable. And then I want to use a script to set the value from global variable into table. It becomes pretty tedious task to map the BO/Connector output parameter using UI action as in the attached image.
Please suggest any easier solution.
Regards
AnuragAttachments:
You must be logged in to view attached files.Stanislav Khodorov5 years ago #16538::Good day everyone!
This is a very good question! Please resolve that!
Also it would be quite nice to have a step by step guide: “How to set columnlistitems into a table with the correct data types, aggregations, items, structs…”. For low code users this seems to be very confusing. Please post that here, in addition please add a nice chapter into the documentation!Thank you and have a nice weekend!
Cheers!Mathieu RollHas successfully completed the online course IntroductionHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)5 years ago #16554::Hello,
please find attached an example where i’m generating a table with script.
Stanislav Khodorov5 years ago #16555::Good morning Mathieu!
Thank you for providing the App! Still I experience some trouble with displaying the table.
The Connector in the example App works and it is loading data:
But the table is not filled with any values. Any idea why this could happen?
I think there is either somewhere a hidden text element (which I don’t see in the Elements section during debugging) or the Mapping into the table entry is not correct. I can’t find the values within the HTML.
It is happening currently to most of my tables, beside the example apps like “ITIZ_Template_REST_ToDoList”.
To point it out further, if I edit the HTML element in the editor, the text appears in the table.Did you have this issue before?
Thank you very much for our support!
Have a good day!
Cheers!anuragkumar5 years ago #16561::Hi @Mathieu,
How we can set the table aggregation data from UI designer itself, may be by setting some attribute with the struct field values, so that we need not map all the fields one bu one in the Connector/BO output mapping and just mapping the global struct variable would be fine?
It would be great if you can share the application transport file link if you have created one.Regards
AnuragFranz4 years ago #20027::Dear Simplifiers,
is there an updated transport available for version 5.0? The available file (https://files.simplifier.io/f/545558de4f5a403c8e4e/?dl=1) says “OK” at the dry run but fails with a postprocessing error when doing a real import.
Thank you
Franz
Mathieu RollHas successfully completed the online course IntroductionHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)4 years ago #21767::Hello Franz,
please find a new Version of the Application here:
https://marketplace.simplifier.cloud/appDirect/SF_Marketplace/index.html#14
GabrielHas successfully completed the online course IntroductionHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)Has successfully completed the online course Advanced (310)Has successfully completed the online course Advanced (320)Vitali KurdasovHas successfully completed the online course Intermediate (200)Has successfully completed the online course Basics (100)Has successfully completed the online course Advanced (310)Has successfully completed the Intermediate Certification3 years ago #27599::Hi Gabriel,
the call you are using seems to work only with elements bound via Simplifiers visualbinding.
In the example the table was bound via an ItemsPath, so the context of the model on pressing the item is not the view name but requires the name ‘variableHolder’.
Please create an new Clientside BusinessObject and create a Method analogous to “ITIZ_Utilities “-> “GetSelectedListItem”.
Afterwards change the scriptline 4 into:
var oOriginal = lo_listItem.getBindingContext(Object.keys(oSelectedItem.oBindingContexts)[0]).getObject();
We are currently working on a solution in ITIZ_Utilities to correct this error.
GabrielHas successfully completed the online course IntroductionHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)Has successfully completed the online course Advanced (310)Has successfully completed the online course Advanced (320)Jennifer HäfnerHas successfully completed the online course Intermediate (200)Has successfully completed the online course Advanced (300)Has successfully completed the online course Basics (100)Has successfully completed the online course Advanced (310)Has successfully completed the online course Advanced (320)Has successfully completed the Intermediate CertificationHas successfully completed the Advanced Certification3 years ago #27797::Hey Gabriel,
Just in case this wasn’t clear before:
Please make sure to create a new method in a new Client Side Business Object and change the code in this new method (from ‘this.getView().getId()’ to ‘variableHolder’). Do not change the code in the method from the ‘ITIZ_Utilities’ Business Object because this Business Object is part of our Standard Content and therefore may be overwritten, e.g. when you re-import the Standard Content.
Also, other apps on your instance using the ITIZ_Utilities Business Object can be affected when you change the method. So the best solution is to create a new Business Object.
You must be logged in to reply to this topic.