I seem to be running into an issue with my onStart - formula is below. When I run the onStart within the builder/editor (manually), it works perfectly. When I go ahead and have my test user run the app, it appears as though the collection is not populating. The table it is calling in SP is open to all my users with read access, and is only 115 rows, so I don't think I'm running into limits. When I run the monitor on the user it simply says 'success' but zero rows returned. I went ahead and turned off use non-blocking onstart rule as recommended in some other threads but the issue persists. I also tried throwing it on onVisible but the net result is the same. I'm basically just importing that to a local table to switch languages for folks.
// Set employee email to avoid delegation.
Set(
employeemail,
Lower(User().Email)
);
// Set today's date to avoid delegation.
Set(
vartoday,
Today()
);
// Import translation Table.
ClearCollect(
TranslationTable,Translation
);
// Get Language and Set variable.
Set(
userlang,
Language()
);
// Language 2 letter code.
Set(
userlangshort,
If(
"-" in userlang,
Left(
userlang,
Find(
"-",
userlang
) - 1
),
userlang
)
);
// Final language code
Set(
userlanguagefinal,
Coalesce(
LookUp(
TranslationTable,
userlangshort = Title
).Title,
"en"
)
);
// Load if available - response
ClearCollect(
existingid,
Filter(
'FLHA Responses V2',
employeemail = 'Created By'.Email And 'Submission Date' = Date(
Year(vartoday),
Month(vartoday),
Day(vartoday)
)
)
)
Hi @C_Baugher ,
Try this
Set(varUser,User());
ClearCollect(
existingid,
Filter(
'FLHA Responses V2',
employeemail = varUser.Email &&
IsToday('Submission Date')
)
)
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.
Your issue is most likely with the date. If the Submission Date includes a time, then you will need to exactly match that time. If it does not include the time, then you might be dealing with a TimeZoneOffset in the comparison due to the Regional Settings on your SharePoint list.
I would research those first.
Beyond that my only other suggestion would be to get rid of the collections and combine this into one variable for easier maintenance.
So, check the column definition for Submission Date and the regional setting for your SharePoint site.
I hope this is helpful for you.
It's the first collection, not the second one. The second one is behaving as expected, I think!
ClearCollect(
TranslationTable,Translation
);
What is Translation? If you put your cursor on that in the formula editor, does it show records?
Translation is my datasource - it's a SP List (has 115 rows which is below any threshold I think). When I dot walk it, it does show the columns, so I think that is connected correctly. The collection does show when I manually run the onstart in papps editor - I go to collections -> TranslationTable -> and I can see five preview items.
Click on the Translation in the formula editor and then click on the down arrow in the bottom formula bar.
See what that shows you.
Huh, weird, okay, so when I do that it says "we didn't find any data". The list definitely has data, and I don't fully understand why the collection shows data if there isn't data to show? I went ahead and recreated the connection with a rename just in case that was part of the issue.
So in your original formula you had Translation, now you are showing TranslationTerms.
Is that of any significance?
Naw, I literally just renamed the list, removed the connection and readded it, just in case it was something funky with the name. Just a troubleshooting step.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
207 | |
72 | |
51 | |
49 | |
20 |
User | Count |
---|---|
264 | |
123 | |
85 | |
79 | |
70 |