-
Notifications
You must be signed in to change notification settings - Fork 28
Custom function with a return type of int, returns a string instead #2568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This issue is stale because it has been open for 7 days with no activity. If there are no further updates, a team member will close the issue. |
Don't close. I am still awaiting someone to triage this issue. |
Same problem here. |
Hey @Hypersight thanks for your report. I was able to follow your steps, and I can see you have a small issue. At the end, you have selected "Number Format" on the Available Options, that is the default one. That is formatting your integer to a String. You need to change that to "No Further Changes" for it to remain as an Integer. |
Thanks! @ignalauret . 🙇 |
You are welcome, glad it worked. Closing this issue because it got solved, good luck with your project! |
Has your issue been reported?
Current Behavior
I have written a custom function that has a return type of int. It passes in a non-nullable list of a custom datatype that has two properties: DocReference (to a Users table) and a datetime field. It also passed in a DocumentReference of the currently authenticated user.
When I attempt to create a condition for a Button element to show, I create a Single Condition, I set the custom function to be the first value to use, i then provide the parameters of the List and the DocumentRef of the Authenticated user.
I leave Available Options as Number Format and Number Format Options as Not Formatted. I then click Confirm to add the first value of my Single Condition.
At this point, it should know that the function has a return type of Int. However, in back in the original Condition window after clicking Confirm, it says that the first value returns (String).
This means that I cannot use comparison types for my Second value of things such as >=, >, <, <= and so on.
Expected Behavior
The custom function is set to return an Int. The custom function returns an Int type parameter, therefore the conditional function should detect it's an Int return type and give me options to select number comparisons.
Steps to Reproduce
Reproducible from Blank
Bug Report Code (Required)
IT4slPHlw852j7xZ1rr+bMJ7/SgUKUB5U4JFscsZa0kdB4joPLJ/P87SSFNucM+lY1NhHGGkjk0D+s2Kv4b9IfQBIROuG5s7+LlcdQqXJHq8R66MC86SVHdtGcFWf2qi0cKjhCZSKulidGwH21z6fum/Ex7sGZO/Zwh9f6PHaOI=
Context
This has made number comparison operations impossible. We have an application that rewards users for amount of points earned for example. This bug now breaks this functionality.
Visual documentation
Additional Info
This did work previously, but think that maybe it regressed after an update at some point in the last 2-3 weeks. I am unable to say which version was affected.
Environment
The text was updated successfully, but these errors were encountered: