web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Option Sets and Blank ...
Power Automate
Answered

Option Sets and Blank values

(0) ShareShare
ReportReport
Posted on by 1,088

I have a bunch of CDS options sets I am trying to set correctly in a flow based on data from SharePoint list.

 

Because of the number, I can't do a bunch of condition actions... 

 

So on the field itself I am using if statements expressions to try to set the values.  Which works fine, except when something doesn't have an option set value, then Flow yells at you because it wants an integer.

 

I have tried: null, empty, ''... the usual, but every time it wants an integer??

 

How do I write the if expression so that if it is blank to begin with and I dont have an update for it, leave it blank?

 

Here's my basic structure for these if statements

 

if(equals(items('Apply_to_each_3')?['new_lossoptions'],null),if(equals(items('Apply_to_each')?['LossOptions'],'Pricing'),100000000,if(equals(items('Apply_to_each')?['LossOptions'],'Incumbent'),100000001,if(equals(items('Apply_to_each')?['LossOptions'],'Lacking Capabilities'),100000003,if(equals(items('Apply_to_each')?['LossOptions'],'Lacking Relationship with Key Decision Makers'),100000004,if(equals(items('Apply_to_each')?['LossOptions'],'Staff Aug'),100000002,if(equals(items('Apply_to_each')?['LossOptions'],'Offsite or Offshore Requirements'),100000005,if(equals(items('Apply_to_each')?['LossOptions'],'COVID-19'),100000006,null))))))),items('Apply_to_each_3')?['new_lossoptions'])

 

Thanks,

Terry

Categories:
  • Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @Mattw112IG,

     

    A short question.

     

    How is your option set field setup? Is the default value an unassigned value or does it have a specific option set value as a default value?

     

    I have just tested that first scenario with the out of the box paymenttermscode option set on the quote table. I believe it is possible to leave that empty.

     

    However, in scenario two (when a default value is one of the option set values) I am not really sure that would be possible.

     

    unassignedvalue.png

     

     

  • Verified answer
    Mattw112b Profile Picture
    1,088 on at

    default is unassigned.

     

    But... I was able to get this working yesterday... so after trying basically everything I could think of... null. empty, '', <blank>, variable with blank, ...

     

    none would work because at the field level it wants an integer.

     

    I ended up using the field itself... so basically if it is null, then put in the value from SharePoint, unless SharePoint is blank, then put the original null field in... at the end of the day it is non assigned, but it works.

     

     

    if(equals(items('Apply_to_each_3')?['new_lossoptions'],null),if(equals(items('Apply_to_each')?['LossOptions'],'Pricing'),100000000,if(equals(items('Apply_to_each')?['LossOptions'],'Incumbent'),100000001,if(equals(items('Apply_to_each')?['LossOptions'],'Lacking Capabilities'),100000003,if(equals(items('Apply_to_each')?['LossOptions'],'Lacking Relationship with Key Decision Makers'),100000004,if(equals(items('Apply_to_each')?['LossOptions'],'Staff Aug'),100000002,if(equals(items('Apply_to_each')?['LossOptions'],'Offsite or Offshore Requirements'),100000005,if(equals(items('Apply_to_each')?['LossOptions'],'COVID-19'),100000006,items('Apply_to_each_3')?['new_lossoptions']))))))),items('Apply_to_each_3')?['new_lossoptions'])

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 335 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard