Issue using icons on grid with validation.

Hi, I want to create a tempo Reports for the first time and I want to use an icon to showed on the grid column with validation.
If the result of the validation is yes for Product A, so it will show an Icon A on the grid column, and if the result of the validation is no for product A, it will show an icon B on the grid column.
Here, I attach a file that was my script, may someone could help me to correct my script if I have some wrong script on it, because my script can't work as well.

Thank you very much for helping :)
-----------------------------------------------------------------
load(
local!pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: 10,
sort: {
field: "dateTimeSubmit",
ascending: false
}
),
with(
local!datasubset: rule!Get_ProjectReport(
local!pagingInfo
),
if(
local!datasubset.totalCount < 1,
rule!APN_uiTextReadOnly(
label: "There are no Project Report"
),
...

OriginalPostID-111898

OriginalPostID-111898

  Discussion posts and replies are publicly visible

Parents
  • Hi, here's a sample code
    ---------------------------------
    1. Create first expression rule with a rule input - product
    2. Enter the code something like below and save

    if(ri!product="A",
                        a!documentImage(document: cons!Icon_A)
              ,
                        if(ri!product="B",
                                  a!documentImage(document: cons!Icon_B)
                        ,
                                  null
                        )
    )
    save the expression rule with filename like - displayProductIcon (this will be called/used in the form as rule!displayProductIcon)
    3. Once the expression rule is created, go to the form and enter the following code
    a!gridImageColumn(
    label: "Product",
    field: "product",
    size: "ICON",
    data:
    apply(rule!displayProductIcon,index(local!datasubset.data,"product",{}))

    )

    The apply loop will call the displayProductIcon expression/function and will loop on each product in the product datasubset.


Reply
  • Hi, here's a sample code
    ---------------------------------
    1. Create first expression rule with a rule input - product
    2. Enter the code something like below and save

    if(ri!product="A",
                        a!documentImage(document: cons!Icon_A)
              ,
                        if(ri!product="B",
                                  a!documentImage(document: cons!Icon_B)
                        ,
                                  null
                        )
    )
    save the expression rule with filename like - displayProductIcon (this will be called/used in the form as rule!displayProductIcon)
    3. Once the expression rule is created, go to the form and enter the following code
    a!gridImageColumn(
    label: "Product",
    field: "product",
    size: "ICON",
    data:
    apply(rule!displayProductIcon,index(local!datasubset.data,"product",{}))

    )

    The apply loop will call the displayProductIcon expression/function and will loop on each product in the product datasubset.


Children
No Data