cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SoufTC
Helper I
Helper I

Formatting column on SharePoint according to today's date

Hello all,

 

I try to formatting on SharePoint columns according to today's date.  I'm having some trouble to use format column.

The list comes from a form created on Power Apps. 

 

Here is the list :

SoufTC_0-1611925860116.png

Status is a choice column.

I try to format Status column :

{
"elmType": "div",
"debugMode": true,
"txtContent": "=if([$currentField.Planned_x0020_date] <= @now, 'Planned', 'Published')"
}

 

it doesn't work I don't know how to do it ! Thank's in advance

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @SoufTC :

Do you want to mark the status as "Published" if the "Publish Date" field is empty?

If so,please try this:
1.JPG

Best Regards,

Bof

View solution in original post

9 REPLIES 9
v-bofeng-msft
Community Support
Community Support

Hi @SoufTC :

  • Could you describe your situation in detail?
  • Is your question about Canvas APP or Flow?
  • What does format Status column mean? What is its function? Where is it used?
  • What are the settings of your app?

Best Regards,

Bof

Hi @v-bofeng-msft,

- I have a SharePoint list, is linked to a form created on Power Apps.

- The form contains :

  • a choice field "Status" with 2 choices "Planned" and "Published"
  • 2 date fileds : "Planned date" and "Published date"

Capture.PNG

What I would like to do is to automate the result for choice field "Status" :

 

If (Status= "Planned" & Planned date <=Today() )

then Status = "Published"

 

I'm looking for a solution whether it's on canvas app or flow.

 

I don't speak English very well, I hope it's clear now. 

 

Best Regards,

v-bofeng-msft
Community Support
Community Support

Hi @SoufTC :

Please try this flow:

1.JPG

Its function is that whenever a record is added or changed in your List, it will automatically judge according to the conditions you provide, and then change the status of eligible items to "published".

70.gif

Best Regards,

Bof

Hi @SoufTC :

Another method is to create a flow that runs regularly, traverse the entire List regularly, and filter out eligible items for update:

1.JPG

Best Regards,

Bof

Hi @v-bofeng-msft Thanks a lot for your time ! 

 

it works down to a detail ! in case the 'Published date' field is empty !

 

Best Regards,

Hi @SoufTC :

Is the problem solved?
If my answer helps, please consider marking it as a solution to help others.Thanks.

Best Regards,

Bof

it doesn't work if the 'Published date' field is empty!

Hi @SoufTC :

Do you want to mark the status as "Published" if the "Publish Date" field is empty?

If so,please try this:
1.JPG

Best Regards,

Bof

View solution in original post

Thank's man,

 

Best Regards,

Bof

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,563)