Im developping an app based on the 2 sharepoint lists :
Bookings(clientName, dateStart, DateFinish, Registration number, Destination)
Vehicules(RegistrationNumber, status, Brand)
i want to update the vehicules list on the start of the app based on the saturated bookings (finish date), i used the formulas :
UpdateIf(Cars, Bookings.DateFinish<Today(), {Status:"Disponible"})
but it gives me the error : invalid argument type, expecting a number value on the "DateFinish" value
anyone knows why ?
thank you in advance
Is your sharepoint list column DateFinish type Date and Time?
sorry for the delay
yes the type is date and time
Hi @medBrahmi,
Could you please share a bit more about the error message within your app?
Could you please show more details about the Cars that you mentioned within the formula?
Further, do you want to update corresponding record in Vehicules list when the DateFinish column value of each record in Bookings list is less than today' date?
If you want to update corresponding record in Vehicules list when the DateFinish column value of each record in Bookings list is less than today' date, I think there is something wrong with the formula that you provided.
I have made a test on my side, please take a try with the following formula:
ForAll(
RenameColumns(
RenameColumns(Bookings,"DateFinish","DateFinish1"),
"Registration_x0020_number",
"RegistrationNumber1"
),
UpdateIf(
Vehicules,
DateFinish1<Today()&&RegistrationNumber=RegistrationNumber1,
{
Status:"Disponible"
}
)
)
Note: The "Registration_x0020_number" represents the Registration number column in your Bookings list.
Or
ForAll(
Bookings,
UpdateIf(
Vehicules,
DateFinish<Today()&&RegistrationNumber=Bookings[@Registration_x0020_number],
{
Status:"Disponible"
}
)
)
Note: The RegistrationNumber represents the RegistrationNumber column in Vehicules list.
More details about the ForAll function in PowerApps, please check the following article:
Best regards,
Kris
sorry i mistyped the the "cars" is meant to be the vehicules list
thank you for your answer good sir, your given formula is perfectly correct but i have a an invalid argument error but this time in the equal sign in the join operation
best regards
medBrahmi
And here's the snippet
Hi @medBrahmi,
Which type the RegistrationNumber column in your Vehicules list ? Is it a Number type column?
Please take a try with the following formula:
ForAll( RenameColumns( RenameColumns(Bookings,"DateFinish","DateFinish1"), "Registration_x0020_number", "RegistrationNumber1" ), UpdateIf( Vehicules, DateFinish1<Today()&&RegistrationNumber=Value(RegistrationNumber1), { Status:"Disponible" } ) )
then check if above formula would solve your problem.
Note: I assume that the type of the RegistrationNumber column in your Vehicules list is a Number type column.
Best regards,
Kris
thank you for the quick response
Yes it is indeed a number type column and i already tried adding value to RegistrationNumber1 but no luck.
Hi @medBrahmi,
Could you please share a bit more about the error message within your formula?
Further, could you please show more details about the data structure of the Cars list?
Please check if there is a RegistrationNumber column (a Number type column) existed in your Cars list.
In addition, please also check if you have modified the RegistrationNumber column name (or change original column name into RegistrationNumber) within your Cars list. If you have modified the column name, please consider take a try to re-create your Cars list, then try the above formula I provided again to check if the issue is solved.
Best regards,
Kris
User | Count |
---|---|
251 | |
102 | |
94 | |
48 | |
37 |