BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
Expand all | Collapse all

BPM File List: Spark UI Control: Enabling/Disabling of Delete(x) icon of Documents containing UI table

  • 1.  BPM File List: Spark UI Control: Enabling/Disabling of Delete(x) icon of Documents containing UI table

    Posted Tue April 25, 2023 05:04 PM
      |   view attached

    Hi,
    We are using BPM Flie List spark UI control for uploading and deleting document with an process instance. Its working fine. However, we have a requirement of enabling/disabling(or hiding) DELETE button icon based on a certain business requirement. Since the DLETE icon appears as per the Configuration>Content Management>Allow Document Deletions option, it seems to be difficult to locate the delete icon index of each row of table data and apply enablement/disablement/visibility logic on table data. Please refer to the attached BPM File List table data UI image.

    If you have implemented similar functionalities, it would be a great help to have the approach  that you have followed. Thanks in advance.

    BAW Version: 19.x and 22.x.

    Regards,
    Deba



    ------------------------------
    Debabrata Singh
    ------------------------------


  • 2.  RE: BPM File List: Spark UI Control: Enabling/Disabling of Delete(x) icon of Documents containing UI table

    Posted Wed April 26, 2023 04:47 AM

    Hi Debabrata,

    You can easily handle the visibility by changing the icons CSS visibility property.
    There are multiple ways of doing this, one way could be - using Dojo query like - 

    dojo.query("div[data-viewid='BPM_File_List1'] > div[data-viewid='DocListPanel'] > div > .panel-body > div > .FileTable > .SPARKTable > div:nth-child(3) > div > table > tbody > tr:nth-child(2) > td[aria-label='Actions'] > div > div > i[aria-label='Delete Document']")[0].style.display = 'none'


    Where in  tr:nth-child(2), 2 is the row index and BPM_File_List1 is the control id of the BPM File List control.



    ------------------------------
    Atanu Roy
    Solution Architect
    Salient Process
    ------------------------------



  • 3.  RE: BPM File List: Spark UI Control: Enabling/Disabling of Delete(x) icon of Documents containing UI table

    Posted Wed April 26, 2023 09:28 AM

    Hi Atanu,
    I have applied the solution you provided and it worked for me. Appreciate your prompt response.

    Regards,
    Debabrata



    ------------------------------
    Debabrata Singh
    ------------------------------