cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Grahambo05
Level 8

Setting Text value for Gallery Item

 I am trying to format one of subtitle's text value for a gallery item. If the End Date is blank, only display Start Date, if not display Start Date - End Date.

 

If(IsBlank(Event_x0020_End_x0020_Date),ThisItem.Date_x0020_of_x0020_the_x0020_Ev,ThisItem.Date_x0020_of_x0020_the_x0020_Ev & " - " & ThisItem.Event_x0020_End_x0020_Date)

 

I am only getting the true value to display, if false it is not displaying anything.

1 ACCEPTED SOLUTION

Accepted Solutions
Grahambo05
Level 8

Re: Setting Text value for Gallery Item

@v-micsh-msft

 

I ended up using flow to update the sharepoint list to update the null values for event_x0020_End_x0020_Date

 

It seems like the else value cannot contain "&" operators, but if value can.

 

If(ThisItem.Date_x0020_of_x0020_the_x0020_Ev<>ThisItem.Event_x0020_End_x0020_Date,ThisItem.Date_x0020_of_x0020_the_x0020_Ev & " - " & ThisItem.Event_x0020_End_x0020_Date,ThisItem.Date_x0020_of_x0020_the_x0020_Ev)

 

 

 

 

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Setting Text value for Gallery Item

It looks like you forgot the ThisItem. inside the call to IsBlank(...

 

 

Grahambo05
Level 8

Re: Setting Text value for Gallery Item

@BitLord69 I added thisitem inside the call to isblank, however same results. It seems to be an error in the else statement, If I replace the value with 

 

If(IsBlank(ThisItem.Event_x0020_End_x0020_Date),ThisItem.Date_x0020_of_x0020_the_x0020_Ev,ThisItem.Event_x0020_End_x0020_Date) will show results.

 

I'm wanting to concat the two thisitem.Date_x0020_of_x0020_Ev, " - ",thisitem.Event_x0020_End_x0020_Date

Community Support Team
Community Support Team

Re: Setting Text value for Gallery Item

Hi @Grahambo05,

 

Take a try with the formula below:

If(IsBlank(ThisItem.Event_x0020_End_x0020_Date),
 ThisItem.Date_x0020_of_x0020_the_x0020_Ev,
  ThisItem.Date_x0020_of_x0020_the_x0020_Ev & "-" &
  ThisItem.Event_x0020_End_x0020_Date)

Or using the Concatenate function:

If(IsBlank(ThisItem.Event_x0020_End_x0020_Date),
 ThisItem.Date_x0020_of_x0020_the_x0020_Ev,
 concatenate(
  ThisItem.Date_x0020_of_x0020_the_x0020_Ev, 
  "-",
  ThisItem.Event_x0020_End_x0020_Date)
  )

Function reference:

Concat and Concatenate functions in PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Grahambo05
Level 8

Re: Setting Text value for Gallery Item

@v-micsh-msft

 

I ended up using flow to update the sharepoint list to update the null values for event_x0020_End_x0020_Date

 

It seems like the else value cannot contain "&" operators, but if value can.

 

If(ThisItem.Date_x0020_of_x0020_the_x0020_Ev<>ThisItem.Event_x0020_End_x0020_Date,ThisItem.Date_x0020_of_x0020_the_x0020_Ev & " - " & ThisItem.Event_x0020_End_x0020_Date,ThisItem.Date_x0020_of_x0020_the_x0020_Ev)

 

 

 

 

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,349)