cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

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
Highlighted
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
Highlighted
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

Highlighted
Helper III
Helper III

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

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