Hey, I'm trying to make a condition in Power Portal Web Form Step where I would like to validate two attribute of the same entity. The first field is Token while the other is Fill Token. Where can I find the entity attribute logical name and is it possible for me to operate two attributes instead of one attribute and one value? Thanks in advance
Solved! Go to Solution.
Hi @Anonymous
Can you please change the variable name and check again? Variable names should not be same as field logical name.
Please try below code or change the variable name:
var cr898_filltokenData = $("#cr898_filltoken").val(); var cr898_tokenData = $("#cr898_token").val(); if(cr898_filltokenData != cr898_tokenData ) { return false; } else { return true; }
--------------------------
If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!
Hi @Anonymous
If you want to hide token field then add below code in webform step:
$( document ).ready(function() {
$("#cr898_token_label").hide();
$("#cr898_token").hide();
});
--------------------------
If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!
Hi @Anonymous As far as I am aware when you create a field in Entity. The schema will be converted in to logical name internally.
In a nutshell:
Both logical and Schema names are similar but for "Schema Names" it will have Pascal case. ex: new_Firstname and the logical name would be fully lower case: ex:new_firstname
Some reference for your kind attention:
https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-objects
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi
In web form condition step you can only compare an attribute against a value, not against another attribute
to find your attributes logical names you can navigate to make.powerapps.com --> solutions --> create your own with your components or open the Default Solution
there you can see the field names
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Power Pages Super User | MVP
Oh I see that now, thanks a bunch. I was going to make a token validation using condition. Is there any way I can achieve that in portal? Thank you in advance!
What exactly you mean by token validation? can you expand a bit more your requirement?
Power Pages Super User | MVP
When a user entered a value, i would like to validate the value so it matches another field in my entity that is autogenerated, which is form. I've tried to make a client-side validation instead of using validate page, but it also only works for value. I guess i made some mistake in the query.
this one works fine but when i changed '9999' with a a variable, it always returns error message.
Hi @Anonymous the client-side validation should work
have you tried printing in the console both "token" and "filled token" to see if they are a match?
Power Pages Super User | MVP
Hi @Anonymous
Can you please change the variable name and check again? Variable names should not be same as field logical name.
Please try below code or change the variable name:
var cr898_filltokenData = $("#cr898_filltoken").val(); var cr898_tokenData = $("#cr898_token").val(); if(cr898_filltokenData != cr898_tokenData ) { return false; } else { return true; }
--------------------------
If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!
Dear @OliverRodrigues I ended up using custom javascript instead of using validation page and it did work, however i had to include the field Token in the form for it to work otherwise it will only return error message. In the desired result, actually the field token is not supposed to appear in the form but hiding the field also makes the validation fails. I finally hid the field name but the text field is still there,.
Thank you so much @hardikv , i had to include the field Token in the form for it to work otherwise it will only return error message. In the desired result, actually the field token is not supposed to appear in the form but hiding the field also makes the validation fails. Is it possible to have this condition when the field is not submitted to the form? Or do I have to use custom css to achieve the field that can't be seen?
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 |