Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
14 replies
Subscribers
7 subscribers
Views
4346 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
using apply and merge on a gridtext column
garym
over 7 years ago
Hi,
I have a grid where one of the columns is supposed to be calculated based on a certain attribute value. The gridTextColumn is below. It just uses a date field called "fssIssuanceDate_datetime" and is supposed to add 4 days to the date if the market type ="F". Otherwise, add 10 days if the market type ="P". This calculation is supposed to happen in a rule that is applied to the data.
For some reason, it is always adding 10 days meaning it seems to ignore the market type="F" where there are definitely records that are equal to that. Everything looks correct to me. The constants being used are correct such as the 4 and 10 days so I don't know if it's something to do with using the apply in a gridTextColumn.
a!gridTextColumn(
label: "FSS Issued On",
field: "fssIssuanceDate_datetime",
data: if(local!datasubset.totalCount=0, {},
...
OriginalPostID-236198
Discussion posts and replies are publicly visible
Parents
0
garym
over 7 years ago
... todate(apply(rule!NOD_calculateFssForOpenNodReport,
merge(
index(local!datasubset.data, "fssIssuanceDate_datetime", {}),
index(local!datasubset.data, "crsMarketType_text", {})
)
)))
),
The code for the NOD_calculateFssForOpenNodReport is the following:
if(
rule!APN_isBlank(
ri!pssIssue_dt
),
"",
if(
ri!marketType_txt = cons!NOD_MARKET_TYPE_F,
caladddays(
ri!pssIssue_dt,
cons!NOD_FSS_CALC_DAYS_FINANCIAL
),
caladddays(
ri!pssIssue_dt,
cons!NOD_FSS_CALC_DAYS_PHYSICAL
)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
garym
over 7 years ago
... todate(apply(rule!NOD_calculateFssForOpenNodReport,
merge(
index(local!datasubset.data, "fssIssuanceDate_datetime", {}),
index(local!datasubset.data, "crsMarketType_text", {})
)
)))
),
The code for the NOD_calculateFssForOpenNodReport is the following:
if(
rule!APN_isBlank(
ri!pssIssue_dt
),
"",
if(
ri!marketType_txt = cons!NOD_MARKET_TYPE_F,
caladddays(
ri!pssIssue_dt,
cons!NOD_FSS_CALC_DAYS_FINANCIAL
),
caladddays(
ri!pssIssue_dt,
cons!NOD_FSS_CALC_DAYS_PHYSICAL
)
)
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data