cancel
Showing results for 
Search instead for 
Did you mean: 

How to use hard-code text in Formatter'state..

Former Member
0 Kudos

Hi Experts

I am using formatter to show the status. But when i try to write some hard code value ( Overall Status) then it is also come in status color.

I want to decolor the hard-code text Overall Status.?

how can it be possible??

I am going to attach my code.

  firstStatus:[

                     {

                      text :"OverallStatus:  {OverallStatus}",

                      state: {

                      path:"OverallStatus",

                      formatter:function(id)

              {

              if(id == "Completely proc")

              {

              return "Success"

              }

              if(id=="Not yet process")

              {

              return "Error"

              }

              if(id=="Partially proce")

              {

              return "Warning"

              }

              } }

thanks and regards

Vishnu

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hi Vishnu,

Will this help? JS Bin - Collaborative JavaScript Debugging

Regards,

Sai Vellanki.

Former Member
0 Kudos

HI.

what is highlight in this ?? and where to use in Js??

saivellanki
Active Contributor
0 Kudos

It's a style class where you're defining the text color as black, place this code in your css file -


.highlight {

      color: #000000;

   }

Regards,

Sai Vellanki.

former_member182862
Active Contributor
0 Kudos

Alternatively, you can use the second status and avoid javascript.

JS Bin - Collaborative JavaScript Debugging

and add css

.sapMObjLBottomRow {

  float: right;

  display: flex;

}

.sapMObjLBottomRow>div{

  margin-left: 4px;

}

Thanks

-D

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vishnu ,

You can use path,formatter function for this.check the example

JS Bin - Collaborative JavaScript Debugging

Regards

Former Member
0 Kudos

Hi Rajeesh

               

   I want to write hard code text  (Overall Status) before Status(shipped / open / in processed) .

But hard code text also come in the same color like Status. and I want to decolor it.Just look at screenshot , i already attach original post.

Could you please help me out..

thanks and regards

vishnu