Skip to main content
September 12, 2022
Solved

how to use java methods in appian

  • September 12, 2022
  • 4 replies
  • 0 views

I have to display the disk space used by the documents in an application in interface. 

I found this java method public java.lang.Long getMegaBytesUsed() in docs.appian.com

Can anyone tell me how to use this java method in Appian to get disk space. 

    Best answer by stefanhelzle0001

    Why is that necessary?

    You have options here. First, just iterate on all the document and sum it up.

    sum(
      a!foreach(
        items: folder(, "documentChildren"),
        expression: document(fv!item, "size")
      )
    )

    Or, store some meta data to the database and do that aggregation over there.

    But even more important, check out the excellent documentation

    https://docs.appian.com/suite/help/22.3/Appian_Functions.html

    https://docs.appian.com/suite/help/22.3/Expressions.html

    docs.appian.com/.../SAIL_Recipes.html

    4 replies

    stefanhelzle0001
    Brainy
    September 12, 2022

    You cannot use any Java in normal Appian. You can write plugins in Java.

    Why do you need Java to display the size of a document? Just call document(<YOUR_DOCUMENT>, "size").

    September 12, 2022

    As part of the application I'm working on, I want to display the how much disk space is used by all the documents present in the KC of the application.

    If it is one application I can use call document(<YOUR_DOCUMENT>, "size").

    stefanhelzle0001
    Brainy
    September 12, 2022

    Why is that necessary?

    You have options here. First, just iterate on all the document and sum it up.

    sum(
      a!foreach(
        items: folder(, "documentChildren"),
        expression: document(fv!item, "size")
      )
    )

    Or, store some meta data to the database and do that aggregation over there.

    But even more important, check out the excellent documentation

    https://docs.appian.com/suite/help/22.3/Appian_Functions.html

    https://docs.appian.com/suite/help/22.3/Expressions.html

    docs.appian.com/.../SAIL_Recipes.html