cancel
Showing results for 
Search instead for 
Did you mean: 

How to set color of individual cell of a column through absl script

Former Member
0 Kudos

Hi

I would like to know how to set color of individual cell of a column through 'absl script'.

What data type can be used to store color in the Business Object.

I tried it though ruby scrip using calculation rule. I was able to do so. But ruby scrip does not work on HTML 5.So couldn't continue with the same.

Regards,

Vandita

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

How do you manage to set the colour for an individual cell?

At the moment I can only change a whole columns colour, I'm selecting the list's column and creating a calculation rule for the background colour using similar code to above but it will colour in the whole column, not just the cell.

Many Thanks,

Will

former_member191213
Participant
0 Kudos

Hi All ,

Can we have any solution for this in 1511 ?

Please reply.

Thanks

Ashish

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Ashish,

Definitely not direct as ABSL is backend and does not know the UI.

If it is still not working in HTML5 but still working in Silverlight you may raise an incident.

Sorry,

    Horst

Message was edited by: Horst Schaude

Former Member
0 Kudos

Vijaya,

Have you tried to set up a element in the Business Object that represents the code value of the cell color you want to set? Then, within ABSL you can update that element through ABSL, and set up and bind a calculation rule to trigger on the update to the element, and set the color based on the same data value as your element.

Not sure if this would actually work, but it seems like it could be worth a try (driving the calculation rule to actually update a back-end value that drives the front-end changes)

If you really had to hack it, you could use LANGUAGE_INDEPENDENT_SHORT_Text to store the appropriate value and hardcode it through ABSL.

Former Member
0 Kudos

Hi,

We have tried this out. And it works fine in Silverlight. But we want the same functionality in HTML5.And calculation Rule(Ruby Script), does not work in HTML 5.

As shown in the below image,it works in Silverlight.

Please suggest how to proceed.

Thanks and Regards,

Vandita

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Vijaya,

Frontend Scripting (aka Ruby Script, SAP Ruby) works also in HTML5.

But maybe the features you are using is not available.

As the Frontend Scripting interpreter is sometiems **** and very canny with (error) messages do mind sharing your code?

Thanks,

  Horst

Former Member

We have added below ruby script for coloring each cell of column based on certain conditions. if ($currentrow.CarParkDescription == "")      result = "GOODVALUE_MEDIUM"; else     result = "CRITICALVALUE_MEDIUM"; end;

Former Member
0 Kudos

Vijaya,

If it simply won't work, a possible workaround might be to try using Select Variant: type of "Binding" instead of Calculation Rule and create a field with the value (an actual BODL field called something like "ValidationColor" which would have the value of "GOODVALUE_MEDIUM" or whatever value you needed.

I work with ByDesign primarily, so i have limited exposure to the HTML5 development - but it may be worth a try.

Former Member
0 Kudos

Hello,

I think as for now there is no way to change the cell color via ABSL. Maybe it is better to wait that it will be supported via html5 using some other kind of scripting for UIs.

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Vijaya,

ABSL is not bound to the UI framework.

So there will never a method to infleunce the UI like cell coloring.

Sorry,

    Horst

former_member200889
Participant
0 Kudos

Hello Alessandro,

Can I modify custom field property(eg. Visible, ReadOnly, Manadtory...) to true or false via ABSL?

Regards,

Daniel

Former Member
0 Kudos

Use an indicator as custom field and bind it to the properties