cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Background color/Icon change depending upon value!!

DALJEET
Participant
0 Kudos

Hi Experts ,

Need some help on Dynamically changing the fields background color depending upon the value OR making a new element in BO and then marking it as an Icon, and dynamically changing the Icon depending upon the values.

Can we achieve this??

Can i get some pointers/help on this.

Br'

Daljeet

Accepted Solutions (1)

Accepted Solutions (1)

DALJEET
Participant
0 Kudos

Hi ,

Which one do you need , for the background color , or icons or both .

Bckground is not working on html5 , icon is .

Br'

Daljeet

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Daljeet,

Both, of course. 

Thanks,

   Horst

DALJEET
Participant
0 Kudos

Hello Again ,

Will share with screen shots in some time , if you dont mind

Br'

Daljeet

DALJEET
Participant
0 Kudos

Hi All ,

Created this Document for reference , please use it for development around this.

Br'

Daljeet

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Daljeet,

I have trouble accessing the document. For me it looks like it is not published.

Can you check?

Thanks,

   Horst

DALJEET
Participant
0 Kudos

Hi ,

It is still pending for approvals .

DALJEET
Participant
0 Kudos

Hello ,

If you want the document , I can send you on your personal ID , if you can provide me the same.

Br'

Daljeet

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Daljeet,

As I am an SAP employee it's Horst.Schaude(at)sap.com

Thanks,

    Horst

dpksghl_30
Participant
0 Kudos

Hi Daljeet,

Actually I have a Business Requirement to change the Button background color when it is enabled.

Is it possible to achieve??..as in your case u r able to change button background color.

I tried it by setting background color property in UI designer but it did't work.

Could u please share the info for changing Background document info regarding icons..

Thanks

Deepak

DALJEET
Participant
0 Kudos

Hi Deepak ,

Did you check in SL??

It is only available in SL , and not in UI5.

Br'

Daljeet

resmi_v
Participant
0 Kudos

HI Daljeet,

I am having an extended field in Salesorder business object which holds an amount value.

If the amount is not 0.0, I need to set a back color for the field value.

How can I achieve this? In extensibility explorer I could not find an option to change back color.

Thanks,

Resmi

DALJEET
Participant
0 Kudos

Hi ,

you have to create an indicator field in BO used , and then use the same to define icons ,please follow the example in document attached , and if you still get stuck , I will take this up, dont worry.

Br'

Daljeet

resmi_v
Participant
0 Kudos

Thanks Daljeet.

Yes I have an indicator field in BO .but in user interface in extensibility explorer , for the balance field property I could not find a back color property.

Can you please give me more details /steps to do this.

Regards,

Resmi

DALJEET
Participant
0 Kudos

Hi ,

Can you share me details / screen shots on daljeetkohli@gmail.com.

Thanks

Answers (3)

Answers (3)

ludger_bunger
Participant
0 Kudos

Hi Daljeet,

to dynamically map icons to specific values (preferably using a codelist but this also works on other content) do as follows:

in the UI Designer:

  1. Add an Icon control to your floorplan
  2. In the Properties "Icon Information" Section:
    Bind the "value" property of the icon to the bo field you like to have the icon react to
  3. Optional: set a Default Icon (used if no mapping applies)
  4. Open the Icon Mapping Collection by pressing the ... - Button in the icon properties
    The Icon Mapping Collection Dialog will appear
  5. Add Icon Mappings:
    1. Set the Value property of the mapping to the field value you like to have the icon be mapped to
    2. Select the respective Icon Resource property as the Icon.

Hope to help,

Ludger

DALJEET
Participant
0 Kudos

Hello ,

I have done the required development using some other way , and I found it very easy but with some development and can accommodate any number of icons.

But , not to mention , Thank you!!

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Daljeet,

May you share how you did it?

Reg. HTML5: This may be not / no longer supported.

Therefore I am curious how you achieved it.

Thanks,

   Horst

DALJEET
Participant
0 Kudos

Just to add further , I have achieved the dynamic icons also:

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Daljeet,

You can not change dynamically the background color or an icon.

Sorry,

   Horst

DALJEET
Participant
0 Kudos

Hello ,

Thanks!

But I am able to make background color changes attached ,The issue is the colors are visible in silver light and not on html5 page , any clues?

Br'

Daljeet