Hello,
I have an issue where a gallery is not showing the correct information from the form it is attached to. Specifically, I have a data card in the form for the date/time. I have set the default property to “Now ()” to show the current date/time on the form and when I submit the form, it records that value. Although, when I view a record in the gallery, it shows the current date/time and not the recorded date/time f rom the form submission.
i also have a column of choices on the forum for which I have changed to a radio selection and none of these radio selections are showing the selected value after viewing the submission in the gallery.
Thank you for your help in advance!
Hi @DerrickH ,
The Default of the Hour drop-down
Text(
Hour(
If(
YourFormName.Mode = FormMode.New,
Now(),
ThisItem.YourDateTimeField
)
),
"00"
)
and just substitute Minute on the other one.
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.
MVP (Business Applications) Visit my blog Practical Power Apps
That is correct. I mistakenly identified the gallery was the issue when in reality my issue was with the Form Field. This formula worked! Thank You! Although the "Hour" & "Minute" fields within the form are still showing the current, time. Would I navigate to the default property in each of those fields as well and input your formula?
Hi @DerrickH ,
OK we have established (I hope) the issue is with the field in the Form (not the label in the Gallery which you are now confirming is correct - your original post says I have an issue where a gallery is not showing the correct information from the form it is attached to.)
To summarise
There are a couple of ways you can you this, but probably the best is in the DefaultDate
If(
YourFormName.Mode = FormMode.New,
Today(),
Parent.Default
)
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.
MVP (Business Applications) Visit my blog Practical Power Apps
@WarrenBelz I don't know if I'm explaining this correctly then. When you select a record from the gallery and it shows you all of the information that was submitted through the form.....should it not show you the exact date/time the form was submitted? My issue is when I select a record in the gallery and by selecting the record, which navigates to a different screen showing the results of the submitted form, the recorded date/time the form was submitted changes to the current date/time when viewing the results of the submitted form. The other results of the submitted fields of the form are produced and correct, the only field that is not correct(in my opinion) is the date the inspection was submitted, which shows the current date/time which should show the recorded date/time. The item property of the form when viewing the results of the submission is GalleryHS.Selected.
It's possible I could be using the wrong formula, I don't know.
I am still trying to understand exactly what the issue is - what is the Item of your Form and where is it you are seeing what you believe is the wrong date (the one that does not match the date you can see in SharePoint on the record you are viewing) ?
@WarrenBelz I apologize. I'm very new to PowerApps. So here is what I am trying to accomplish and I will include some pictures as well.
I have created an Inspection form that is linked to a SharePoint List. Within my "edit" form in PowerApps, I have a Datacard called "Date of Inspection". My purpose for this field is to automatically populate the current Date & Time on the form so the user does not have to select. Within the Date of Inspection DataCard, I have set the Default properties of the datevalue, hourvalue & minutevalue areas to Now(), see the attachments for additional clarification. Every time the form loads in New or Edit display modes, the current date and time autopopulates on the form.....which is my goal.
- Saving/submitting the form saves that specific date/time from the form to my SharePoint list.
- The gallery on my home screen also shows the specific date/time of when I saved the form.
The problem is not until I select the record in the gallery to view the record in the "view" display mode, which produces the submitted form but shows the current date/time instead of the submitted date/time.
Hi @DerrickH ,
I probably asked the wrong question - what is the date in the SharePoint record ? It would be the date the record was created unless you change it when first saving. I am trying to understand what it is that is not working as expected.
@WarrenBelz , Yes...apologies that was a typo. Could it have anything to do with the SharePoint List Column settings? The Default value under the column settings was set to Today's Date?