Skip to main content

16 replies

venkatrea696188
April 3, 2024

We need more details about your expected output

mk0724
mk0724Author
Known Participant
April 3, 2024

I have a list of deals which are created and have a field known as closing date while closing the deal.

When i closed a deal it should get reflected in other grid based on the quarter.

The quarters are divided based on Jan to mar, apr to jun, jul to aug, and oct to dec.

The grid should show case the deals  based on the quarter in current year.

venkatrea696188
April 3, 2024

Write a Decision rule or Multiple If statements. Use Month Function to get the month of CloseDate.

 


month(ri!closeDate)

The grid should show case the deals  based on the quarter in current year

What do you mean by this You want to Query it from Database based on quarter or You want to just manipulate Queried Data?

vishala6464
April 3, 2024

You can try this---

if(
or(
month(todate(ri!date)) = 1,
month(todate(ri!date)) = 2,
month(todate(ri!date)) = 3,
),
"Jan-Mar",
if(
or(
month(todate(ri!date)) = 4,
month(todate(ri!date)) = 5,
month(todate(ri!date)) = 6,
),
"Apr-June",
if(
or(
month(todate(ri!date)) = 7,
month(todate(ri!date)) = 8,
month(todate(ri!date)) = 9,
),
"July-Sep",
"Oct-Dec"
)
)
)

harshitb6843
April 3, 2024

For improved readability. 

vishala6464
April 3, 2024

you can do like this by using custom record fields in record type

davidj137213
Brainy
April 3, 2024

Use this

  trunc((month(local!date) /3),0)  +1

mathieud0001
Brainy
April 4, 2024

This type of expression is a little more flexible as it will work for non-standard quarters (i.e. Jan-Mar = Q4)

a!match(
  value: month(ri!date),
  whenTrue: fv!value <= 3,
  then: 4,
  whenTrue: fv!value <= 6,
  then: 1,
  whenTrue: fv!value <= 9,
  then: 2,
  default: 3
)

You can also replicate this logic in a Custom Record Field using https://docs.appian.com/suite/help/24.1/fnc_crf_customfieldmatch.html

marioo5689
April 4, 2024

HI, if you want to devide the "Year" In "Quarters" based on "Dates", here is the way to do it: 

if(
  isnull(rv!record['recordType!{4d75e90b-cfa1-4109-8430-d517fc558bbb}MMS Meeting.fields.{2e6f1ac9-328d-44df-bf3a-93cc8f6bab07}startDate']),
  null,
  /* Quarter: Concatenate Q and the quarter number */
  "Q" & floor((month(rv!record['recordType!{4d75e90b-cfa1-4109-8430-d517fc558bbb}MMS Meeting.fields.{2e6f1ac9-328d-44df-bf3a-93cc8f6bab07}startDate'])-1)/3) + 1
  /* Year: Concatenate year */
  & " " & year(rv!record['recordType!{4d75e90b-cfa1-4109-8430-d517fc558bbb}MMS Meeting.fields.{2e6f1ac9-328d-44df-bf3a-93cc8f6bab07}startDate'])
)

INPUT VALUES: 

OUTPUT: