cancel
Showing results for
Did you mean:
See all
See all
##### Top groups
Explore all groups

• Global
• Personal

• Give kudos
• Given

• Global

### Kudos (beta program)

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

# It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

# Trying to find the lowest value entered into custom fields

I have 3 fields that capture a number value. I would like to find the lowest value of the 3 fields (not null AND not 0).  I created a SIL script to do this - however it assumes all 3 fields have a value.  Truth is that not all fields are required so they may not have a value. Here is my script:

number QuotationV1 = #{Quotation 1 Total Value};
number QuotationV2 = #{Quotation 2 Total Value};
number QuotationV3 = #{Quotation 3 Total Value};

if (QuotationV1 != 0 && isNotNull(QuotationV1)) {

if ((QuotationV1 < QuotationV2) && (QuotationV1 < QuotationV3)) {
#{Lowest Bid Cost number} = #{Quotation 1 Total Value};
#{Lowest Bidder} = #{Quotation 1 Vendor};
}
}
else {
if (QuotationV2 != 0 && isNotNull(QuotationV2)) {

if (QuotationV2 < QuotationV1 && QuotationV2 < QuotationV3) {
#{Lowest Bid Cost number} = #{Quotation 2 Total Value};
#{Lowest Bidder} = #{Quotation 2 Vendor};
}
}
else {
if (QuotationV3 != 0 && isNotNull(QuotationV3)) {

if (QuotationV3 < QuotationV1 && QuotationV3 < QuotationV2) {
#{Lowest Bid Cost number} = #{Quotation 3 Total Value};
#{Lowest Bidder} = #{Quotation 3 Vendor};
}
}
}
}

Hoping someone can see a obvious solution.

###### TAGS
Community showcase
Published in Marketplace Apps & Integrations

### New Cloud Apps Roundup - Spring 2021

Atlassian's marketplace partners have had a very productive start to 2021! Since our last roundup, our developer community has added over 160 new cloud apps to the Atlassian Marketplace to help you...

119 views 3 14

### Community Events

Connect with like-minded Atlassian users at free events near you!

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.