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

Concatenate fields if specific value selected from dropdown

Hi Everyone

This is probably very basic PowerApp question  but I am still learning...

I want to concatenate fields if only "A and B"  value selected from drop down,  If not selected I want the text filed to remain blank 

My formula is;

Text filed : If(DataCardValue8.Selected.Value="A and B", (Concatenate(Text(DataCardValue11.SelectedDate,"ddmmyyyy"),"-", ddBusinessArea.Selected.Value))

Concatenate works fine but seems like I cant use such a formula within IF statement ?

Thank you 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
CNT
Super User
Super User

@ezi79 You can use Concatenate with an If. Your formula seems to be having an extra bracket. Try this,

If(DataCardValue8.Selected.Value="A and B", Concatenate(Text(DataCardValue11.SelectedDate,"ddmmyyyy"),"-", ddBusinessArea.Selected.Value))

View solution in original post

@ezi79 Try this,

If(DataCardValue8.Selected.Value="A and B", 
	Concatenate(Text(DataCardValue11.SelectedDate,"ddmmyyyy"),"-", ddBusinessArea.Selected.Value,"-", Text(First(Sort(FCOG,ID,Descending)).ID+1))
)

View solution in original post

9 REPLIES 9
CNT
Super User
Super User

@ezi79 You can use Concatenate with an If. Your formula seems to be having an extra bracket. Try this,

If(DataCardValue8.Selected.Value="A and B", Concatenate(Text(DataCardValue11.SelectedDate,"ddmmyyyy"),"-", ddBusinessArea.Selected.Value))

View solution in original post

@CNT 

Thank you so much have a great day

@ezi79 Glad to help! 

askondo
Community Support
Community Support

@CNT The solution you provide is very nice.

@askondo Thanks for the motivation!

ezi79
Helper II
Helper II

@CNT 

Hi 

One more question If I may please, I  need to  include next SharePoint item ID within concatenate formula since concatenate expecting text it does not accept the formula. 

If(DataCardValue8.Selected.Value="A and B", Concatenate(Text(DataCardValue11.SelectedDate,"ddmmyyyy"),"-", ddBusinessArea.Selected.Value,"-", Value(First(Sort(FCOG,ID,Descending)).ID+1.ID)))

Could you help me ?

Thank you very much 

 

@ezi79 Try this,

If(DataCardValue8.Selected.Value="A and B", 
	Concatenate(Text(DataCardValue11.SelectedDate,"ddmmyyyy"),"-", ddBusinessArea.Selected.Value,"-", Text(First(Sort(FCOG,ID,Descending)).ID+1))
)

View solution in original post

@CNT That worked , lovely thanks a lot have a good evening 🙂

@ezi79 You too!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,968)