Hey!
I just created something like an inventory list and therefore i need to safe variables.
As you can see in the picture below, every object does have a variable "Aktueller Besitzer", which means current owner, and a variable "Vorbesitzer", which means previous owner.
As soon as i save my changes i want that the current owner automatically gets the previous owner.
Therefor i need to safe the name behind current owner to replace the previous owner with it.
Thanks for your help!
Yours
Rene
Solved! Go to Solution.
Hi @Rene1997 ,
According to your description, I've made a test for your reference:
1\ This is my list ‘LIST82’. ‘multimeter’ is a single line of text column. ‘previous owner’ and ‘current owner’ are person columns.
2\ Add a gallery control ‘Gallery2’ in Screen2 and set its Items property to:
LIST82
Set ‘Gallery2’ ‘s onselect property to:
Set(Thevar,ThisItem);Navigate(Screen3)
3\ Add an edit form control ‘Form1’ in Screen3 and set its DataSource property to:
LIST82
Set ‘Form1’ ‘s Item property to:
Gallery2.Selected
Set ‘Form1’ ‘s Fields property like picture:
Set previous owner ‘s control’s DisplayMode property to:
DisplayMode.Disabled
4\ Add a submit icon and set its onselect property to:
Patch(LIST82,Thevar,{'previous owner':Thevar.'current owner',Title:DataCardValue1.Text,multimeter:DataCardValue2.Text,'current owner':DataCardValue3.Selected})
// DataCardValue1 and DataCardValue2 are textinput control in ‘Form1’. DataCardValue3 is a combo box control in ‘Form1’.
5\ The result is as follows:
In this solution, I used the patch() function to submit data instead of the submitform() function.
Since this is a broad question, this is only a reference example, you need to make some modifications according to your own data and controls.
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Hi @Rene1997 ,
Could you tell me:
Sorry i am confused about your needs.
Could you tell me your needs in the form of pictures?
For example, the picture before the data is modified./ the picture after modifying the data (the result you need).
Best Regards,
Wearsky
Hey @v-xiaochen-msft
Thanks for your reply.
1. I created the list on MS Teams via "Lists" and then i created an app with Power Apps. Or what do you mean with the structure of my list?
2. Yes, 'Aktueller Benutzer' and 'Vorbesitzer' are choice columns
How can i find out the data type?
I'd say its a string?
Sorry im new to power apps..
Thanks!
Hi @Rene1997 ,
Could you tell me:
What's your data source? Is it sharepoint list or CDS(Dataverse)?
Just want to confirm, have you created a canvas app in teams?
Firstly, I hope you provide the column name of your data source and its data type.
For example:This is my list . 'TestPerson' column 's data type is Person.
Secondly , please elaborate on your needs. Sorry I am very confused about the requirement you mentioned at the beginning.You could use pictures and text to express your needs. Thanks.
Best Regards,
Wearsky
Hey @v-xiaochen-msft
My data source is a sharepoint list.
Ah - now i know what you mean. The data type of of both, so current owner and previous owner, is Person.
I'll try again to explain what i want to do:
If someone wants to use an object, like a multimeter in this case, they should press the arrow and change the status of the multimeter so everyone knows they have it.
In the following form you should enter the date when the object is used and who owns it now.
If something is missing or damaged, I want to know who was the previous owner.
To know this, I need to make the current owner the previous owner.
And that is before he enters himself as the current user.
So I have to save the current user and replace the previous owner with it.
Yours,
Rene
Hi @Rene1997 ,
According to your description, I've made a test for your reference:
1\ This is my list ‘LIST82’. ‘multimeter’ is a single line of text column. ‘previous owner’ and ‘current owner’ are person columns.
2\ Add a gallery control ‘Gallery2’ in Screen2 and set its Items property to:
LIST82
Set ‘Gallery2’ ‘s onselect property to:
Set(Thevar,ThisItem);Navigate(Screen3)
3\ Add an edit form control ‘Form1’ in Screen3 and set its DataSource property to:
LIST82
Set ‘Form1’ ‘s Item property to:
Gallery2.Selected
Set ‘Form1’ ‘s Fields property like picture:
Set previous owner ‘s control’s DisplayMode property to:
DisplayMode.Disabled
4\ Add a submit icon and set its onselect property to:
Patch(LIST82,Thevar,{'previous owner':Thevar.'current owner',Title:DataCardValue1.Text,multimeter:DataCardValue2.Text,'current owner':DataCardValue3.Selected})
// DataCardValue1 and DataCardValue2 are textinput control in ‘Form1’. DataCardValue3 is a combo box control in ‘Form1’.
5\ The result is as follows:
In this solution, I used the patch() function to submit data instead of the submitform() function.
Since this is a broad question, this is only a reference example, you need to make some modifications according to your own data and controls.
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
User | Count |
---|---|
256 | |
108 | |
97 | |
51 | |
39 |