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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Option Sets and Blank values

(0) ShareShare
ReportReport
Posted on by 1,084

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

I have the same question (0)
  • Expiscornovus Profile Picture
    32,857 Most Valuable Professional on at
    Re: Option Sets and Blank values

    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,084 on at
    Re: Option Sets and Blank values

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 691 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 431 Moderator

#3
developerAJ Profile Picture

developerAJ 266

Last 30 days Overall leaderboard