cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Ali_Nawaz
Level: Powered On

Apply text format to data present in Collection

Hi PowerUsers, 

I have this collection called "PayPeriColl" which holds the data of Pay Period Start and Pay Period End.
I'm making this collection on AppOnstart with the following code. 
It gathers the record from a response returned by Flow / Power-Automate.

collections.png

 

This is the result it returns 

PayPeriodColleection.png

 

I want to apply format to these columns Like "dd/mm/yyyy". 

As i have to display the result in a drop down. 
Currently I am concatenating PayPeriod Start and Pay Period End from this record set and storing it in a collection called "PayPeriodRange" (See first image above).

This is what I have achieved with it 

range.png

and this is what being displayed in drop-down 
dropdown result.png

 

How can I apply format to record set in collection so that I may be able to display these pay periods in "dd/mm/yyyy" format ? 

Best Regards,
Ali Nawaz

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Apply text format to data present in Collection

Hi @Ali_Nawaz 

 

In this case, you can try out the below expression on the Drop-down control directly. You can eliminate the usage of collection if it is not used elsewhere.

Expression:

AddColumns(CollectionName,"MyColl",Text(DateValue(PeriodStartDate),"[$-en-US]dd/mm/yyyy")&"-"&Text(DateValue(PeriodEndDate),"[$-en-US]dd/mm/yyyy")).MyColl

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

View solution in original post

2 REPLIES 2
Dual Super User
Dual Super User

Re: Apply text format to data present in Collection

Hi @Ali_Nawaz 

 

In this case, you can try out the below expression on the Drop-down control directly. You can eliminate the usage of collection if it is not used elsewhere.

Expression:

AddColumns(CollectionName,"MyColl",Text(DateValue(PeriodStartDate),"[$-en-US]dd/mm/yyyy")&"-"&Text(DateValue(PeriodEndDate),"[$-en-US]dd/mm/yyyy")).MyColl

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

View solution in original post

Ali_Nawaz
Level: Powered On

Re: Apply text format to data present in Collection

@yashag2255 Thanks man it worked perfect. 

I was missing Datevalue while casting the PayperiodStarts into texts. 

Thanks again  🙂 


Best Regards, 
Ali Nawaz

Helpful resources

Announcements
thirdimage

Power Platform 24

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps 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

Top Solution Authors
Top Kudoed Authors
Users online (6,179)