cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate IV
Advocate IV

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

@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
Power Participant
Power Participant

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

 

 

@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

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.

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,009)