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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / One or more fields pro...
Power Apps
Unanswered

One or more fields provided is of type 'Null', a different type is expected.

(0) ShareShare
ReportReport
Posted on by 220

Good Morning,

I have a  word document template and I use Power Automate to fill the template and save the file.

The flow works great , except that my toggle values are showed as true/false on the document.  I would like to change them so that true is displayed as 'Yes' and  false is displayed on the document as 'No'. 

TB05_0-1663155799241.png

I would like the values changed to a Yes or No in the word document.

So I have entered the following into an expression for each yes/no value, but now I get a null error.  

TB05_1-1663156160599.png

if(triggerOutputs()?['body/OData__x0051_30'],'Yes','No')
 
I thought about using the following, but not sure how to implement it into my expression.
TB05_2-1663156256599.png

Any thoughts on how to rid of the null error?

 

Thanks

Categories:
I have the same question (0)
  • v-chengfen-msft Profile Picture
    on at

    Hi @TB05 ,

     

    I assume when triggerOutputs()?['body/OData__x0051_30'] is empty and the output is Null.

    Here is a formula for your reference:

    if(empty(triggerOutputs()?['body/OData__x0051_30']), null ,if(equals(triggerOutputs()?['body/OData__x0051_30'],true),'Yes','No'))

     

    Best Regards

    Cheng Feng

     

  • Verified answer
    TB-20081424-0 Profile Picture
    220 on at

    @v-chengfen-msft thank you for your response.  Using your expression, I was able to output the true/false to yes/no on the word document with a minor tweak.  Thanks for your help.

     

    if(equals(triggerOutputs()?['body/OData__x0051_1'],null), coalesce(triggerOutputs()?['body/OData__x0051_1']) ,if(triggerOutputs()?['body/OData__x0051_1'],'Yes','No'))

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard