I have an app whose datasource is a Sharepoint list and i have a field that can have 1 of 2 possible values. It is a text field in Sharepoint called "triptype" - the values can be either "WORKRELATEDTRAVEL" or 'FIELDTRIP"
I have a Gallery where the user selects the trip record for editing by clicking a button - the OnSelect property is:
If(
Gallery5.Selected.triptype.Value = "WORKRELATEDTRAVEL",
(Navigate(
NEWTRIPMANAGER,
Fade,
{
varWRT: true,
varFROMGALLERY5: true
}
)),
Navigate(
NEWTRIPMANAGER,
Fade,
{
varWRT: false,
varFROMGALLERY5: true
}
)
)
In the NEWTRIPMANAGER screen I have a button which (sometimes) toggles between displaying the text WRT and FIELD - based on the value the user will have more or less fields to complete before submitting the trip. The OnSelect of the button is:
UpdateContext({ varWRT: !varWRT })
\\and the Text proerty is:
If(varWRT=true,"WRT","FIELD")
it seems to work once changing from one value to the other but then stops changing.......it used to work in my app but something must have changed and it no longer works..
well I have solved the problem by changing:
UpdateContext({ varWRT: !varWRT })
to:
UpdateContext({varWRT: !varWRT})
@gabibalaban Yes my OnSelect says If triptype=WORKRELATEDTRAVEL set varWRT,true else false - see above code
There is no reason why the code should not work.
If(varWRT,"WRT","FIELD")
Is your OnSelect code from the button more complex ? A IF clause can cause this ?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.