cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MatthieuMegaly
Kudo Collector
Kudo Collector

Display a collection field in a textbox

Hello,

 

I have a simple collection created when clicking on a button. I want to display some fields from that collection on some textboxes... I did not find any way to get that simple result. Any help from here ?

 

Thanks for your reply,

 

 

Matthieu Megaly
2 ACCEPTED SOLUTIONS

Accepted Solutions
hpkeong
Community Champion
Community Champion

Hi

 

Collection is a Table.

You can display either using:

1. Gallery: Items = CollectionName, and textbox (inside the Gallery) with Field Titles, OR

2. FirstN(CollectionName, #), # Number to records to display, or use LastN, of Combination of LastN and FirstN for specific records, OR

3. Create a Dropdown1, with Items = Distinct(Collection Name, Field1 to display), and in correspondence to a TextBox, with: LookUp(CollectionName, Field1 in Dropdown1.Selected.Result).Field2, Field2 is the field to be displayed in TextBox.

 

Wish I understand what you want.

 

TQ

 

hpkeong

View solution in original post

Ok i found a way to do what i want with the gallery. I don't think this is the best way to simply display a collection field in a textbox but it works,

 

Thank you ! 

 

Matthieu

Matthieu Megaly

View solution in original post

10 REPLIES 10
hpkeong
Community Champion
Community Champion

Hi

 

Collection is a Table.

You can display either using:

1. Gallery: Items = CollectionName, and textbox (inside the Gallery) with Field Titles, OR

2. FirstN(CollectionName, #), # Number to records to display, or use LastN, of Combination of LastN and FirstN for specific records, OR

3. Create a Dropdown1, with Items = Distinct(Collection Name, Field1 to display), and in correspondence to a TextBox, with: LookUp(CollectionName, Field1 in Dropdown1.Selected.Result).Field2, Field2 is the field to be displayed in TextBox.

 

Wish I understand what you want.

 

TQ

 

hpkeong

View solution in original post

Hey,

 

Thank you for your answer,

I'll make some test but i really think you are right with your solutions and it will fit my need,

I'll come back and let you know soon,

 

Matthieu

Matthieu Megaly

Ok i found a way to do what i want with the gallery. I don't think this is the best way to simply display a collection field in a textbox but it works,

 

Thank you ! 

 

Matthieu

Matthieu Megaly

View solution in original post

Hi

 

Yes, I am only sharing one of the many way (which I know and used before) of getting what you want. Definitely wishing someone smarter, like you, to share with us here, better way, for us to learn from you.

 

Do share with us here your better / best way. THanks

hpkeong

@hpkeong Thanks, this helped me today! 

ikari007
New Member

Well you asked for help.  Help was provided, you didn't like it. Then you found a solution and you didn't share it.  There is only one name for the kind of person you are.

Hi @hpkeong ,

 

I have tried with this approach ,Can you please help me with code.

 

I have tried a button with this code.

 

ClearCollect(Collection_C,Date(Year(Now()),Month(Now()),1))

 

Now i want to show that value in Textbox field.

 

FirstN(Collection_C.Value,1)

 

In Textbox filed written above code but it is showing error "Expected Text value".

 

Please help me where i am wrong or need to add?

 

Thanks

Ankush

Hi @hpkeong ,

 

I have tried with this approach ,Can you please help me with code.

 

I have tried a button with this code.

 

ClearCollect(Collection_C,Date(Year(Now()),Month(Now()),1))

 

Now i want to show that value in Textbox field.

 

FirstN(Collection_C.Value,1)

 

In Textbox filed written above code but it is showing error "Expected Text value".

 

Please help me where i am wrong or need to add?

 

Thanks

Ankush

007James_Bond
Helper I
Helper I

Hi @MatthieuMegaly ,

 

I have tried with this approach ,Can you please help me with code.

 

I have tried a button with this code.

 

ClearCollect(Collection_C,Date(Year(Now()),Month(Now()),1))

 

Now i want to show that value in Textbox field.

 

FirstN(Collection_C.Value,1)

 

In Textbox filed written above code but it is showing error "Expected Text value".

 

Please help me where i am wrong or need to add?

 

Thanks

Ankush

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (70,868)