Skip to Content

How to add multiple buttons in SAP Cloud Fiori Inbox footer?

Hi,

I want to add multiple buttons in Fiori Inbox task footer.

Question 1: I want to add 2 buttons in Inbox task footer with type = “Accept”. But the issue is only button with type “Accept” gets added(Same with Reject). When I open the task, only the last added action ie “Validate” button is shown in the footer. Is this expected behavior?

action = "Approve"; //action 1
startupParameters.inboxAPI.addAction({
action:oApproveAction.sBtnTxt,label:oApproveAction.sBtnTxt,type: "Accept"
}, oApproveAction.onBtnPressed);

action = "validate"; //action 2
startupParameters.inboxAPI.addAction({
action:oValidateAction.sBtnTxt,label:oValidateAction.sBtnTxt,type: "Accept"
}, oValidateAction.onBtnPressed);

Question 2:

As a workaround to issue in Question 1, I tried adding 2 buttons(Approve and Validate) with type=” Emphasized”. I am able to see both the buttons in footer. But now the issue is, when I click on the button that I added first (Approve button), the “Validate” action is being called. This means, the first action with type=” Emphasized” is being overwritten with second button with type “default”. So, Again, like Issue in Question 1, I am able to only call one action. Is this expected behavior?

What is the workaround to add multiple buttons with same type? I have around 4 buttons to be placed in footer as per the client requirement.

I would like to use standard footer because I need “Claim” and “Show log” feature.

action = "Approve"; //action 1
startupParameters.inboxAPI.addAction({
action: oApproveAction.sBtnTxt,label:oApproveAction.sBtnTxt,type: "Emphasized"
}, oApproveAction.onBtnPressed);

action = "validate"; //action 2
startupParameters.inboxAPI.addAction({
action: oValidateAction.sBtnTxt,label:oValidateAction.sBtnTxt,type: "Emphasized"
}, oValidateAction.onBtnPressed);

Thanks,

Shilpa

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 02 at 05:22 PM

    Hello Shilpa,

    Did you try by removing the 'type'? I am not too sure whether Inbox app will allow 2 buttons of type 'accept(green)' and 'reject(red)'. But I could be wrong in assuming that. As per following screen-shot from sapui5 library, it's not clear whether you can use same types.

    Regards,

    Arpit

    Add comment
    10|10000 characters needed characters exceeded

    • Are you sure you have defined a different "Action" value for each button?

      Again, adding multiple buttons with different actions should not be an issue.
      The only restriction is that you cannot have more than one button of type positive/negative.

  • Mar 04 at 03:50 PM

    Hello Shilpa,

    Answer1: You cannot add two buttons of same type as "Accept" or "Reject". There could be only one button of one type in My Inbox.

    Answer2: What are these 4 buttons for? Ideally you can either Approve or Reject/ Accept or Decline etc. in My Inbox.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Archana,

      Answer1 - OK,

      Answer 2: I have 5 buttons "Validate" (Mandatory & data validations), "Save", "Approve" , "Reject" & "Cancel Process". Does it mean I cannot place all these buttons in Inbox footer? Any workaround other than moving other buttons to UI screen? If possible. I want to avoid placing few buttons at UI level and few in footer.

      Thanks,

      Shilpa