cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Andy77-2
Advocate II
Advocate II

Cant add gallery dropdown selection to a collection

Hi Folks

 

I have a gallery with dropdown selections. I want to patch the gallery items to a collection whhich I then perform further transformations. 

Untitled.png

 

 

 

 

 

 

 

The collection is created when the button "Create Collection for Patch" is selected:

Untitled3.png

 

 

 

 

The problem is, the dropdown selections in the collection dont seem to be correct. For instance, if I place the collection in another gallery for troubleshooting, incorrect business units are shown. Anyone else had this problem?

Untitled2.png

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Andy77-2 ,

The data in collection will not automatically update when the drop down's selection changes.

Since your collection is created when you clicking on the "create collection for patch" button, the data in collection is that time's data. It's static data, will not update automatically. You need to update the collection by using some behaviour formulas.

If you want to the collection's data update everytime you change selection of drop downs, I suggest you not only set the button's OnSelect, but also put your ClearCollect function to every Drop down's OnChange.

Set the Drop down's OnChange:

ClearCollect(collectionname,galleryname.AllItems)

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
K-A-R-L
Solution Specialist
Solution Specialist

Hi @Andy77-2 ,

 

It seems like it only returns the first value on the collection.
On your gallery Text Field. You shoud proabbly use LookUp() function:

LookUp Syntax = LookUp(DataSource, Condition, Result)
//in your case
LookUp(RelatedNatCodes, Code = ThisIte.Code, BusinessUnits) //BusinessUnits is a column on your DataSource/Collection

----------------------------------------------------------------------------
Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.

Thanks Carl, but I dont think that is the answer. For instance if I look at what is in the RelatedNatCodes collection:

 

Untitled4.png

 

 

 

 

 

 

 

 

 

And I drill into the first row for Dropdown1 for code TP00834 :

 

Untitled5.png

 

 

 

 

 

 

 

 

 

 

And then I drill into SelectedText I can see the value assigned to the collection is different to the dropdown selection. It is like when the collection is created, it is not getting the correct selected business unit value from the gallery.

 

Untitled6.png



 

 

 

 

 

 

 

 

 

 

 

Untitled6.png

Have looked into this further and I think it is a bug with the gallery. The AllItems property of the main gallery isnt returning the latest state of the gallery selections. This means it is impossible to obtain any selected values from the dropdowns. @Meneghino sorry to annoy you but are you aware of this issue? I saw that there have been some recent issues with the gallery.

seadude
Memorable Member
Memorable Member

Hm. That ".SelectedText" property is a newer one. Do you have the option for ".Selected.Value" ?

Nah it is the same problem either way but thanks for the suggestion. Have narrowed it down to only occuring with a collection as the main gallery's data source. If the main gallery is instead connected direct to a database (SQL in my case) and not to a collection it seems to work fine (as shown below with a different gallery) then the dropdown data is instantly changed in the connected gallery as you would expect. Looks like I will have to remove the collection from the main gallery's data source and swap it with a Filter() around the SQL data connection.  Must be because the collection isnt being updated as the dropdowns change.

Untitled.png

Hi @Andy77-2 ,

The data in collection will not automatically update when the drop down's selection changes.

Since your collection is created when you clicking on the "create collection for patch" button, the data in collection is that time's data. It's static data, will not update automatically. You need to update the collection by using some behaviour formulas.

If you want to the collection's data update everytime you change selection of drop downs, I suggest you not only set the button's OnSelect, but also put your ClearCollect function to every Drop down's OnChange.

Set the Drop down's OnChange:

ClearCollect(collectionname,galleryname.AllItems)

 

 

Best regards,

Community Support Team _ Phoebe Liu

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

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.

Top Solution Authors
Top Kudoed Authors
Users online (53,398)