cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ClevrCompuBloke
Helper II
Helper II

Passing non blank/empty values to SharePoint list

I created an expense form for use in the UK, and we are refining it.

The values are passed to a SharePoint list. The majority of the items are in GBP£ and there is a branch in the form, which asks if in non GBP£.

 

The branch has acceptable currencies as a drop down.

Another question is for a fixed exhange rate (so if they used their own card for an item, and the bank has already debited their account with GBP£.

 

If these values are blank I would like to pass values back to SharePoint.  

The currency would pass "GBP£" and the Fixed exchange rate would be "1.00"

 

We cannot use default values in Forms (unless I am mistaken) and this would be confusing so is ther an =IF(isblank[DYNAMIC CONTENT CONTAINING EXHANGE],"GBP£",[DYNAMIC CONTENT CONTAINING EXHANGE]) type expression I can use for both Form questions?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ClevrCompuBloke 

 

This is the solution we discussed.

 

if(equals(length(outputs('Get_response_details')?['body/r6688d3e4e0304985a2aeb74406d55a08']),0),'GBP£', outputs('Get_response_details')?['body/r6688d3e4e0304985a2aeb74406d55a08'])

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

10 REPLIES 10
abm
Super User
Super User

Hi @ClevrCompuBloke 

 

You could try and see if that works? If not try the length expression where content is 0 (zero) or not?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Ah, by good friend @abm , its good to hear from you.  

I did test out with this type of forumla, but get an  expression is invalid error.

IF(ISBLANK(outputs('Get_response_details')?['body/r6688d3e4e0304985a2aeb74406d55a08']),"GBP£",outputs('Get_response_details')?['body/r6688d3e4e0304985a2aeb74406d55a08'])

I did wonder about adding another part of the flow that looks at the newly created list and if the values there are blank updating them.

 

BTW the form/flow ignores default value of the list.

Hi @ClevrCompuBloke 

 

 

How are you doing?

 

Try the below

 

if(equals(length(outputs('Get_response_details')?['body/r6688d3e4e0304985a2aeb74406d55a08']),0),concat('GBP£',outputs('Get_response_details')?['body/r6688d3e4e0304985a2aeb74406d55a08']),'')

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hi @ClevrCompuBloke ,

 

Could you please take a try with expression below:

if(empty(outputs('Get_response_details')?['body/r6688d3e4e0304985a2aeb74406d55a08']),'GBP£',outputs('Get_response_details')?['body/r6688d3e4e0304985a2aeb74406d55a08'])

 

If the dynamic content don't have value in to, the output of expression is string GBP£, and if the dynamic content has value in it, the output of the expression is the value.

 

Best regards,

Alice   

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @abm  thanks for the update, when the value is empty, this works very well, but when there is a value it doesnt pass that to the SharePoint list.

Hello @v-alzhan-msft ,

 

I tried the code you kindly supplied, and the flow didnt return any errors, but it seemed not to work on test and just got the circle/egg timer. Atfer 15 mins I left the page and will try again to see I have copied it properly.

Hi @ClevrCompuBloke 

 

It should be other way around

 

if(equals(length(outputs('Get_response_details')?['body/r6688d3e4e0304985a2aeb74406d55a08']),0),'',concat('GBP£',outputs('Get_response_details')?['body/r6688d3e4e0304985a2aeb74406d55a08']))



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

ah,

@abm  now we re getting close, but as the CONCAT is used, it adds GBP£and the value of the form, so we had GBP£USD.

 

Is there anything other than CONCAT  we can use ?

Hi @ClevrCompuBloke 

 

This is the solution we discussed.

 

if(equals(length(outputs('Get_response_details')?['body/r6688d3e4e0304985a2aeb74406d55a08']),0),'GBP£', outputs('Get_response_details')?['body/r6688d3e4e0304985a2aeb74406d55a08'])

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

As per usual @abm  you are a star. worked like a charm

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,678)