cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MAYURIV
Helper II
Helper II

how to map users from login screen to another sharepoint list

Hi,

In my project, I had no login screen initially. Only forms were there. Based on forms filled, we were updating the response of form in another sharepoint list1.In this list, we were updating user name by ThisItem.'Created By'.DisplayName. This list was updating  O365 user of powerapp.

 

Now instead of updating the sharepoint list 1 response sheet with O365 powerapp user name, we want to update with user created in login screen.

I have created a login screen from one sharepoint list2 having list of users and password.

 

I want to update these user names from login screen to  sharepoint list1.

Please help.

 

17 REPLIES 17
SUPRIYAK
Helper III
Helper III

yes sir

MAYURIV
Helper II
Helper II

Thank you so much sir for your quick response. We are new to this software and quick help like this helps us a lot.

MAYURIV
Helper II
Helper II

Hi!

Can we add multiple patch function in ForAll function of powerapps?

Below is the code for patching a new record in sharepoint list.

 

Patch(AOA_FT_Response,Defaults(AOA_FT_Response),
{field_Equipment_Name:Var_Eqp_Selected_Cond,
field_Check_List:Lbl_CheckPoint.Text,
Check_Sr_N:lbl_Sino.Text,
field_Response_Value:If(Radio4.Visible,Radio4.SelectedText.Value,Txt_Ip_Data.Text),
field_Actions_Taken:If(Chk_Box_Action_1.Value,"* " &Chk_Box_Action_1.Text)&If(Chk_Box_Action_2.Value," * "& Chk_Box_Action_2.Text)&If(Chk_Box_Action_3.Value," * " & Chk_Box_Action_3.Text)&If(Chk_Box_Action_4.Value," * " & Chk_Box_Action_4.Text)&If(Chk_Box_Action_5.Value," * " & Chk_Box_Action_5.Text)&If(Chk_Box_Action_6.Value," * " & Chk_Box_Action_6.Text),
field_Start_Time:Var_Start_Time,
field_End_Time:Now(),
User: TextInput3.Text
})
);

 

This sharepoint list AOA_FT_Response will hold all responses which user enter in the form.

Now our client has given one more requirement of creating new sharepoint list which will hold only abnormal conditions entered by user. Can I write same code as posted above using forall and patch in the save button for abnormal conditions?

Can we nest multiple patch function in powerapps?

 

Please help.

 

HI @MAYURIV ,

What identifies abnormal conditions ?

SUPRIYAK
Helper III
Helper III

Sir we are dealing with the same project so I am replying in this post. 

We have a form in gallery with radio buttons(screenshot attached  below)

SUPRIYAK_0-1642068260334.png

In this form, default selection i.e. 1st option in radio button is nominal value, whereas others are abnormal value. currently we have below screen for data log

SUPRIYAK_1-1642068420801.png

in which we are logging all the inputs entered by user. 

 

now, we want to show only abnormal values in response data column of data log screen. 

 

Below is the code we are putting in save button for logging all data inputs:

 

ForAll(Gallery_Check_List_Details.AllItems,

 

Patch(AOA_FT_Response,Defaults(AOA_FT_Response),
{field_Equipment_Name:Var_Eqp_Selected_Cond,
field_Check_List:Lbl_CheckPoint.Text,
Check_Sr_N:lbl_Sino.Text,
field_Response_Value:If(Radio4.Visible,Radio4.SelectedText.Value,Txt_Ip_Data.Text),
field_Actions_Taken:If(Chk_Box_Action_1.Value,"* " &Chk_Box_Action_1.Text)&If(Chk_Box_Action_2.Value," * "& Chk_Box_Action_2.Text)&If(Chk_Box_Action_3.Value," * " & Chk_Box_Action_3.Text)&If(Chk_Box_Action_4.Value," * " & Chk_Box_Action_4.Text)&If(Chk_Box_Action_5.Value," * " & Chk_Box_Action_5.Text)&If(Chk_Box_Action_6.Value," * " & Chk_Box_Action_6.Text),
field_Start_Time:Var_Start_Time,
field_End_Time:Now(),
USER: TextInput3.Text
})
);

Can you please suggest, what changes need to be done for logging only abnormal values.

Hi @SUPRIYAK ,

The structure would be as below

ForAll(
   Filter(
      Gallery_Check_List_Details.AllItems,
      YourAbnormalFilterHere
   ),
   Patch(
      AOA_FT_Response,
      Defaults(AOA_FT_Response),
      {
         field_Equipment_Name:Var_Eqp_Selected_Cond,
         . . . . . .

but I note you have different radio controls for different gallery items, so I am not sure what the filter is.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

MAYURIV
Helper II
Helper II

Thank u so much sir.

SUPRIYAK
Helper III
Helper III

Thanks a lot Sir.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,433)