Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
460 views
in Technique[技术] by (71.8m points)

powerapps - Can't get the correct field in the browser gallery, the column name won't appear

I have a sharepoint list with 3 columns: Title, Category, Quantity. It's a simple inventory list of about 10 items that fields managers can look up availability before making a request for equipment.

The category column is giving me a problem. It's a choice column and each item must have at least one option picked, but some have more. I put this here because we might expand this inventory list depending on how it goes and I want to have another sorting option.

I want to have Category show up in the list of fields I can choose from for the browser gallery the same way I can choose Title & Quantity, but it doesn't appear. I'd like for it to be there so there is an option to search by category. I can't figure out what to do.

I have some coding experience and can get comfortable changing that in powerapps, but I have no real experience in powerapps other than a few videos and articles. As of now all I've done is connect my sharepoint list as the data source after I clicked on + Create in the left menu and just let it make the default I guess.

Any suggestions?

question from:https://stackoverflow.com/questions/65946543/cant-get-the-correct-field-in-the-browser-gallery-the-column-name-wont-appear

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The list of the fields that can be selected via the Fields "wizard" on the right-hand pane are those that have simple "translations" to a text column, such as text or numeric columns in your SharePoint list, or even choice columns with a single selection. Since Category is a multi-select choice column, then the conversion is not as trivial, so the wizard doesn't offer that option.

You can update it yourself, however. For example, you can select one of the existing labels in the gallery (or add a new one), and update its Text property with a function such as Concat that can combine multiple elements into a single one, like in the example below:

Concat(ThisItem.Category, Value, ", ")

Here's an example; I have a SP list with a few fields:

SharePoint list with choice columns

If I add a gallery and try to use the "Fields" dialog to choose a multi-selection choices field, it won't show up (as I mentioned above):

Multiple-selection choice column does not appear

So to use that we need to edit the expression for the label in the formula bar directly. In this example I'm replacing the 'ChoiceSingle' field, but you could also add another label to hold the multi-selection field:

Adding multi-select choice column to gallery


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...