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

Submit form not working with choices values in sharepoint list

I am using a powerapps form to edit a sharepoint list and I have three ComboBoxes that are named as dropDepartamento, dropArea and dropAtividade.

 

The items of dropDepartamento are retrieved using the following code:

Choices('Avaliação de Risco'.Departamento)

And the other two ComboBoxes depends on what is selected in the ComboBox 'dropDepartamento'

dropArea:

Filter(Áreas;OData__x00c1_rea.Id=dropDepartamento.Selected.Id)

dropAtividade:

Filter('Atividade de Risco';Departamento_x003a_ID.Id=dropDepartamento.Selected.Id)

The 'update' is set to <comboboxName>.Selected

the filtering function works pretty well, but on the submit of the form, only the dropDepartamento saves the chosen option, the others just stays with the same value as before and there is no visible error on the code.

1 REPLY 1
Community Support Team
Community Support Team

Re: Submit form not working with choices values in sharepoint list

Hi @domVitu,

Could you please share a bit more about the Area column and Atividade column in your 'Avaliação de Risco' SP list (which your current Edit form connects to)? Are they both LookUp type columns?

Further, could you please show more details about the data structure of your 'Avaliação de Risco' SP list?

Based on your statement, I suppose that the Area column and Atividade column are both LookUp type columns (Area column reference values from Áreas SP list, Atividade column references values from 'Atividade de Risco' SP list), is it true?

Based on the formula that you mentioned, I think there is something wrong with it.

I have made a test on my side, please take a try with the following workaround:2.JPG

 

3.JPG

Set the OnVisible property of the first screen of my app to following:

ClearCollect(StudentCollection, '20190108_Student') /* <-- '20190108_Student' represents the Student SP list on my side*/

Within the Edit form, set the Items property of the Combo Box within the Student Data card (LookUp column) to following:

Filter(StudentCollection, School.Value = DataCardValue6.Selected.Value).StudentName  /* <-- DataCardValue6 represents the Combo Box control within the School Data card */

On your side, you should type:

Filter(Áreas; OData__x00c1_rea.Id = dropDepartamento.Selected.Id)

Set the Update property of the Student Data card to following:

{
    Id: LookUp('20190108_Student', StudentName = DataCardValue7.Selected.StudentName, ID),
    Value: DataCardValue7.Selected.StudentName
}

On your side, you should set the Update property of the Area Data card to following:

{
    Id: LookUp(Áreas, ReferencedColumn = AreaComboBox.Selected.Value, ID),
    Value: AreaComboBox.Selected.Value
}

Set the Update property of the Atividade Data card to following:

{
    Id: LookUp('Atividade de Risco', ReferencedColumn1 = AtividadeComboBox.Selected.Value, ID),
    Value: AtividadeComboBox.Selected.Value
}

Note: The ReferencedColumn represents the column in your Áreas SP list, which your Area column (in your 'Avaliação de Risco') references values from. The ReferencedColumn1 represents the column in your 'Atividade de Risco' SP list, which your Atividade column references values from.

 

 

Best regards,

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