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

Update Form Value Via Control

Hello everyone.  I am still on my journey to create an app for my school.  I have a quick question, that I am sure is easier for many of you experts out there, but is giving me some issues.  

 

If you look at the attached screenshot, you will see that it is tied, to an absent form.  The form has a gallery, showing students for the designated day, via the dropdown.  Once the student is chosen, the form on the right is filled in with the information tied to the PMCS table.  As you can see now, I have a checkbox, that is changing the Absent, from Present to Absent.  However, I feel as if this is not the best practice, because if you change names in the gallery, and then come back to the same name, the check box, might possibly be checked, when it shouldnt be.  Which in turn confuses the user.

 

I was thinking of just changing the the control to a regular button, that toggels between, Absent, Present, or Null.  But I cant wrap my head around how to do it with the button as opposed to the check box.  The formula is just a bit to complex for me at this time...

 

I hope you guys can help.ice_screenshot_20171220-130838.png

8 REPLIES 8
Toasteroven
Level: Powered On

Re: Update Form Value Via Control

In my opinion i dont think a button would be best in this situation

 

Perhaps replace the toggle button with a dropdown that can have either Absent or present?

 

Im not sure if you are saying it should always be unchecked or you would like some students to have the box checked by default and others not.

 

If you want the dropdown unchecked by default then just set the default property to be present.

 

If you want the dropdown to depend on the student then use an if statement to check a condition tied to each student.

 

Sorry if this want what you were looking for at all its just how i would do it.

PPanfili
Level: Powered On

Re: Update Form Value Via Control

The issue I am having is that if the person who is running the app, clicks on the first student, checks the box to mark them either absent...

 

Then clicks on the second student, and marks them present.  Then if they return back to the first student, the checkbox will be on present, however, the student in the first instance was absent.  So it could lead to confusion if changes need to be made.  

 

What I need, is for whatever contorl I use, to reflect whether the student is absent or present.  So if someone clicks back and fourth between the students, the control is reflecting what they choose, to stop confusion.

 

For instance, User logs in.  Clicks first student, Marks absent.  Clicks second student, marks present.  Then returns to first student, but the checkbox, is confuses, so if they were to mark present, they would have to click the check box twice.

 

That is why I feel a button would be great, to just toggle between absent present.  So if it reads Present, and the button is pressed it switches to absent, and vice versa....

 

But I am to much of a novice to write out code for the button

 

Toasteroven
Level: Powered On

Re: Update Form Value Via Control

From what i can tell present/absent is not tied to the student information to the left, it is a value you select after loading the data which then gets patched or submitted to another spreadsheet

 

Ok so which are you trying to achieve?

 

1. You want the app to remember if a student was marked present/absent and display the correct term when loading their information a second time

 

2. you simply looking for a nicer way to convey to the user whether a student is present/absent and you dont mind if when switching between students it stays on the same value, as long as it is clear to the user.

 

Let me which one you are going for and i would be glad to help with some code

PPanfili
Level: Powered On

Re: Update Form Value Via Control

What I want is the button to toggle the Datacard1 field...Which is the Absent/Present Field.

 

If the box is empty, if the button is clicked, it will mark it Present....If the box currently has Present in it, it marks it Absent.

 

If the box has Absent in it, it marks it to Present..

 

So it in essnces toggles between present and absent...

PPanfili
Level: Powered On

Re: Update Form Value Via Control

Here is my attempt at the button, it still is not working correctly, it is only changing to present...And nothing else.

 

UpdateIf(PMCS,Gallery1.Selected.Absent=Absent,{Absent:"Present"});UpdateIf(PMCS,Gallery1.Selected.Absent=Present,{Absent:"Absent"})

Toasteroven
Level: Powered On

Re: Update Form Value Via Control

Once again you are not being totally clear. It seems like you are asking about two seperate things.

 

1. You dont think the check box is conveying the information clearly to the user and you want to replace it with a button

2. Whatever you are using here be it a button or a check box is not remembering what you picked last time.

 

The code you have written for a button seems like you are trying to do the exact same thing the check box was doing, therefore you are replacing it with a button. This is doing nothing to solve the initial issue you posted about where the control doesnt remember what you picked last time.

 

The updateif is just another way of changing the data souce. Simply tapping the checkbox toggles it, you do not need another button to toggle it for you.

 

Are you simply trying to replace the checkbox with a button or do you want it to remember what you picked last time or both?

 

PPanfili
Level: Powered On

Re: Update Form Value Via Control

I am trying to be as clear as possible.

Let me try to make it as simple as possible.

All I want is for a button to change the field from Present to Absent or Absent to Present, or from Null to absent or present...

Basically the button just needs to cycle thru the various Absent or Present.

Therefore the user won't be confused..he would just simply keep tapping the button till he arrived are his desired choice, albeit absent or present.

I feel that is the simplest way.
I hope this is more clear.
PPanfili
Level: Powered On

Re: Update Form Value Via Control

Anyone out there can help me with this? Still haven't figured out.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (2,117)