Hi all,
Screenshot attached.
I have a dropdown 'Morning Staff Name' which looks up the persons email address from our Office365. This is a required field.
Below this is a text entry box for 'Other Staff/Agency Name' - not a required field.
What I am trying to do is:
If 'Other Staff/Agency Name' is not blank (i.e. the user has entered a name), then 'Morning Staff Name' should = 'agency@email.org.uk' (for example) to stop an error when submitting the form.
I'v been trying <>"" and !IsBlank combinations but the proper syntax escapes me.
Help please 🙂
Kev
Solved! Go to Solution.
oh wow 😺 +1 for the autism crowd as I'm autistic too!
Ok, right so it's looking for a record, so we just need to create a record that matches the column or value it's looking for,
so we generate a record by using record format:
{ nameofThing : "valueOfThing"}
which may look something like this:
If(
!IsBlank(DataCardValue12.Text)
,
{
Value: "agency.worker@autismhampshire.org.uk"
}
)
Value here might be the column name depending on how your combobox is done, could you give that a try in your DefaultSelectedItems rather than Default as well, sorry about the confusion earlier!
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Whoops, that's a typo on my part!
If you aren't already I would also take a look at all of the guidance for App Makers online, then spotting stuff like this becomes a lot quicker 😺
If(
!IsBlank(DataCardValue12.Text) && IsBlank(DataCardValue1.Selected.Text)
,
{
Value: "agency.worker@autismhampshire.org.uk"
}
)
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Heya!
Within the Default/DefaultSelectedItems for the first one:
If(
!IsBlank(NameOfOtherStaffAgencyNameControl.Text),
"agency@email.org.uk"
)
however, if this is a people picker, that account needs to exist! so do you have a generic account it can use?
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi @iAm_ManCat
If I understand you correctly, the Default property of DataCardValue1 (Morning staff name) =
If(!IsBlank(DataCardValue12.Text),"agency.worker@autismhampshire.org.uk")
DataCardValue12 is the Other staff/agency name field. The email address for agency.worker does exist.
However, this returns an error:
oh wow 😺 +1 for the autism crowd as I'm autistic too!
Ok, right so it's looking for a record, so we just need to create a record that matches the column or value it's looking for,
so we generate a record by using record format:
{ nameofThing : "valueOfThing"}
which may look something like this:
If(
!IsBlank(DataCardValue12.Text)
,
{
Value: "agency.worker@autismhampshire.org.uk"
}
)
Value here might be the column name depending on how your combobox is done, could you give that a try in your DefaultSelectedItems rather than Default as well, sorry about the confusion earlier!
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi @iAm_ManCat , that worked first time in DefaultSelected Items!! Brilliant. Thank you so much 🙂
I think it's a nice sin chronicity that you are autistic - I work for a charity that supports autistic adults in small residential settings. The apps will replace all the paper records we currently have to keep. But there are dozens of them so it will take me a long time to do 🙂
I have some experience as a web designer several years ago using Dreamweaver and Adobe Flash, so have a basic understanding of HTML, Javascipt, and Visual Basic. So quite often I know what I need to happen but the actual syntax of the formula escapes me.
Thank you again for your help.
Kev
Happy to help!
haha yeah don't get me started on forms, we have so many that I never even put them into the backlog, instead focusing on the Core Apps for now - If I could go back and start from scratch again though, I would definitely have started with the quick wins like forms!
Cheers,
Sancho
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hi @iAm_ManCat , I have an addendum to this formula if possible.
When implementing it I discovered I need to cover another eventuality. Occasionally we have two members of staff supporting one individual. You can select more than one name in 'Staff Name' look-up which is fine. The issue of course is if it is contracted member of staff plus an agency staff.
At present I can put my name in 'Staff Name', but when I put the agency name in it overwrites my name with 'agency.worker' etc.
I really need it to keep whatever has been inputted into staff name if it isn't blank.
Kev
Ok,
So I'm thinking something along the lines of:
If(
!IsBlank(DataCardValue12.Text) && (IsBlankDataCardValue1.Selected.Text)
,
{
Value: "agency.worker@autismhampshire.org.uk"
}
)
and I'm not sure about the bit in Red, as might be looking for Email or something else instead, so could you type the '.' and let Intellisense do the rest 🙂
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Whoops, that's a typo on my part!
If you aren't already I would also take a look at all of the guidance for App Makers online, then spotting stuff like this becomes a lot quicker 😺
If(
!IsBlank(DataCardValue12.Text) && IsBlank(DataCardValue1.Selected.Text)
,
{
Value: "agency.worker@autismhampshire.org.uk"
}
)
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
User | Count |
---|---|
206 | |
94 | |
87 | |
47 | |
43 |
User | Count |
---|---|
252 | |
104 | |
103 | |
61 | |
57 |