on 03-31-2014 3:35 AM
Hi, I'm trying to implement some front end scripting and can't seem to access the data elements bound to a AdvancedListPane Control.
I'm expecting to be able to perform an operation similar to:
$data.DataList.Get(0).FamilyName |
and then perform some operation that particular cell.
Unfortunately I can never get a script file to access the elements inside a list. Can anyone help please?
Thanks
Alexander Ludwig
Hi Alexander,
I believe I had also faced similar issue which was fixed by using Resolve.
Try something like coll = $controller.Resolve('/Root/DataList')
Incase if you are looking at the value of FamilyName in current record for which this script is running you can also write fname = $controller.Resolve('/Root/DataList/FamilyName') and it would get the current records F Name.
Also check if the name of your collection within Datamodel is Datalist or it is renamed by any chance.
Regards
Vinod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vinod,
I haven't renamed it, but the Intellisense does not display any available methods or parameters other than @RowCount, @HasLeadSelection, @LeadSelectedIndex.
I am actually very new to using the front-end scripting and I am trying to set the BackGroundColour properties of the individual cells.
Thanks
Alex Ludwig
Hi Alexander,
I had never done the colour change but it seemed to be interesting to explore on this. Below is my analysis.
You can have only fixed colours for the background of a column within the Table/ALP as in below image.
Select a particular column and you should see a property called Background Colour
Select on the field and you should see something like below.
In the above image you see the radio button Calculation Rule where you can write some scripting to modify it dynamically.
The code will look something like below.
result = 'STANDARD' // This is a fallback value in case the if condition below is not satisfied.
if( $currentrow.xxx == 'xx' ) // Here xxx should be the element within the table
result = 'BADVALUE_DARK' // This is one of the value from above screenshot.
end
$currentrow would give you the current row and you can read any element.
So this way you can also colour a column based on value in another column
It seemed to be impossible for me to get the index of the current row which is displayed, kind of a lacking feature I guess.
Hope this helps
Regards
Vinod
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.